I’m following the Ruby on Rails tutorial and I’m on chapter 2. When I enter the command
rails new demo_app
this error spills out. I’ve tried searching for a solution but none of the answers matched. I tried uninstalling/reinstalling railties and rails but still get the same error.
run bundle install
Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.
6/lib/rails/generators/app_base.rb:254:in ``': No such file or directory - ""Z:/
Program Files/RailsInstaller/Ruby1.9.3/bin/ruby.exe"" -rubygems "Z:/Program File
s/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/bin/bundle" i
nstall (Errno::ENOENT)
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
railties-3.2.6/lib/rails/generators/app_base.rb:254:in `bundle_command'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
railties-3.2.6/lib/rails/generators/app_base.rb:258:in `run_bundle'
from (eval):1:in `run_bundle'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/task.rb:27:in `run'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/invocation.rb:120:in `invoke_task'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/invocation.rb:126:in `block in invoke_all'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/invocation.rb:126:in `each'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/invocation.rb:126:in `map'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/invocation.rb:126:in `invoke_all'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/group.rb:238:in `dispatch'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
thor-0.15.2/lib/thor/base.rb:408:in `start'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
railties-3.2.6/lib/rails/commands/application.rb:38:in `<top (required)>'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/
rubygems/custom_require.rb:55:in `require'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/
rubygems/custom_require.rb:55:in `require'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
railties-3.2.6/lib/rails/cli.rb:15:in `<top (required)>'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/
rubygems/custom_require.rb:55:in `require'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/
rubygems/custom_require.rb:55:in `require'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/
railties-3.2.6/bin/rails:7:in `<top (required)>'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/bin/rails:19:in `load'
from Z:/Program Files/RailsInstaller/Ruby1.9.3/bin/rails:19:in `<main>'
Any suggestions? Thank you.
Not an answer but a solution.
So I gave up and uninstalled railsinstaller and reinstalled in the Z:\ directory.
The whitespace in the “Program Files” caused too many problems, not only this one. (Although it did not seem to have any problems with the basic tutorial apps I’ve been working through with the RoR Tutorial.)
The bundle install command worked fine after this. I’m sure there’s another way of pathing the space but I don’t know how and I don’t think it’s worth the trouble.
I hope this helps someone. I also commented on some answers related to the space issue so if you are having other issues, my history might help.