bundler throws user_interaction.rb:534:in 'initialize': No such file or directory - nul (Errno::ENOENT)
After updating to rubygems 1.5.0, I g开发者_如何学Goet this error message when trying to run bundle install.
I am running on a cygwin environment with ruby 1.8.7 and bundler v 1.0.10
bundler throws user_interaction.rb:534:in 'initialize': No such file or directory - nul (Errno::ENOENT)
Can't really figure out what is causing this.
I am also having the same problem, I'm running rubygems 1.5.0, ruby 1.9.2, and bundler 1.0.10, on cygwin, and any time I try to run bundle I get the same error.
Actually, I just figured it out. I'm assuming you are running Cygwin too, as here's the code that's causing the problem:
(in .../user_interaction.rb:534)
if Gem.win_platform?
reader = File.open('nul', 'r')
writer = File.open('nul', 'w')
else
reader = File.open('/dev/null', 'r')
writer = File.open('/dev/null', 'w')
end
See, it thinks you're using windows, when actually you are using linux within Cygwin. So just comment out everything EXCEPT the two lines reader = File.open('/dev/null', 'r')
and writer = File.open('/dev/null/, /w/)
, and you should be good.
Obviously this is a rough fix, but does the trick as long as you aren't running the same installation of rubygems on windows natively.
精彩评论