Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error starting foreman: "Can't cd to ..." #696

Closed
davidalejandroaguilar opened this issue Jan 5, 2018 · 6 comments
Closed

Error starting foreman: "Can't cd to ..." #696

davidalejandroaguilar opened this issue Jan 5, 2018 · 6 comments

Comments

@davidalejandroaguilar
Copy link

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$
@polyakovigor
Copy link

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

@olivierlacan
Copy link

@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.

@boehle
Copy link

boehle commented Feb 26, 2018

@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.

@olivierlacan
Copy link

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

@ddollar
Copy link
Owner

ddollar commented Feb 26, 2018

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

@ddollar ddollar closed this as completed Feb 26, 2018
olivierlacan referenced this issue in gauravtiwari/webpacker-example-app Feb 26, 2018
@boehle
Copy link

boehle commented Feb 26, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants