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

Puma start issue on Ruby on Windows using Cygwin bash #1023

Closed
fera2k opened this issue Jul 20, 2016 · 4 comments
Closed

Puma start issue on Ruby on Windows using Cygwin bash #1023

fera2k opened this issue Jul 20, 2016 · 4 comments

Comments

@fera2k
Copy link

fera2k commented Jul 20, 2016

When you have a Windows environment with Cygwin set, and you try to start a Rails 5 app, with "rails s", which uses Puma by default, I had this exception:

C:/Ruby22/lib/ruby/gems/2.2.0/gems/puma-3.5.0/lib/puma/launcher.rb:323:in \'stat': No such file or directory @ rb_file_s_stat - /c/Projects/test1 (Errno::ENOENT)

Looking inside the code, on launcher.rb, line 321, it tries to get the current dir using ENV['PWD'], but Cygwin returns something like this: '/c/foldername' which is not ok for Ruby on Windows (version 2.2 x86 installed from RubyInstaller.org).

So, I've monkey patched the code, changing ENV['PWD'] for Dir.pwd ruby command, and now it runs fine.

@evanphx
Copy link
Member

evanphx commented Jul 24, 2016

Strange that ENV["PWD"] doesn't work there. I'll use Dir.pwd on cgywin.

@fera2k
Copy link
Author

fera2k commented Jul 24, 2016

Thanks for the fix. Working fine!

@evanphx
Copy link
Member

evanphx commented Jul 24, 2016

@fera2k My pleasure!

@carlos-ssh
Copy link

I had the same issue but i saw that i has different directory and i can't run the server. Please check if you have the same issue than me watching your directory on the command line using "pwd".

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

3 participants