Foreman: Error starting foreman: "Can't cd to ..."

Created on 5 Jan 2018  ·  6Comments  ·  Source: ddollar/foreman

Hello, I get this error when trying to foreman start. I'm running Foreman in Windows 10 WSL.

Procfile

web: bundle exec rails server
worker: bundle exec sidekiq -q default -q mailers

Console log:

david@TOLUCA-PC:/mnt/c/Users/david/Dropbox/Launch School/ls-rails/myflix$ foreman start
/home/david/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/foreman-0.64.0/lib/foreman/process.rb:63: warning: Insecure world writable dir /mnt/c/ProgramData/Oracle/Java in PATH, mode 040777
10:16:22 web.1    | started with pid 14436
10:16:22 worker.1 | started with pid 14437
10:16:22 web.1    | /home/david/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/foreman-0.64.0/bin/foreman-runner: 23: cd: can't cd to /mnt/c/Users/david/Dropbox/Launch\ School/ls-rails/myflix
10:16:22 worker.1 | /home/david/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/foreman-0.64.0/bin/foreman-runner: 23: cd: can't cd to /mnt/c/Users/david/Dropbox/Launch\ School/ls-rails/myflix
10:16:22 web.1    | exited with code 2
10:16:22 system   | sending SIGTERM to all processes
10:16:22 worker.1 | exited with code 2
david@TOLUCA-PC:/mnt/c/Users/david/Dropbox/Launch School/ls-rails/myflix$

Most helpful comment

It is not recommended to run foreman as part of your Gemfile. Please install directly with gem install

All 6 comments

Hello, try to rename Launch\ School directory to be without spaces.

@polyakovigor This is not necessarily feasible on macOS since some system directories include spaces. For example iCloud directories: ~/Library/Mobile\ Documents/

Oddly for me this issue only arises when I run foreman via bundle exec. When it's installed directly, there are no path issues.

@olivierlacan quick question, what do you mean by installing it directly?
I just ran into the same problem and haven't found a solution yet.

@boehle gem install foreman so it's available outside of the bundle exec context.

It is not recommended to run foreman as part of your Gemfile. Please install directly with gem install

Thanks @olivierlacan !

@ddollar thanks for the info. I tried it via the Gemfile first, because the book I'm currently reading suggested the use of foreman and also suggested installing it via the Gemfile.

I now installed it directly and it's working fine now, also pointed out the misuse to the author.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MathieuGilbert picture MathieuGilbert  ·  18Comments

jasonivers picture jasonivers  ·  8Comments

jt2190 picture jt2190  ·  9Comments

wireframe picture wireframe  ·  23Comments

corydolphin picture corydolphin  ·  30Comments