views:

33

answers:

1

I've just upgraded to Rails 3, using the instructions from this railscast. When I try to start the server, this is what happens:

$ rails s
script/rails:6:in `require': no such file to load -- rails/commands (LoadError)
    from script/rails:6:in `<main>'

I can't find this exact error using Google. Anyone know what is causing this? Thanks for reading

EDIT:

Here's the console output:

$ rvm 1.9.2
$ rails -v
Rails 3.0.1
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
$ rails new . -d sqlite3
(all the overwrite checking stuff happens here)
$ bundle install
...
Your bundle is complete! It was installed into /Users/ben/.rvm/gems/ruby-1.9.2-p0
$ rails s
script/rails:6:in `require': no such file to load -- rails/commands (LoadError)
    from script/rails:6:in `<main>'
$ rvm list
rvm rubies
=> ruby-1.9.2-p0 [ x86_64 ]
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
$ rails -v
script/rails:6:in `require': no such file to load -- rails/commands (LoadError)
    from script/rails:6:in `<main>'
+1  A: 

Have you actually installed the rails 3.0.x gem? Maybe you missed this step :).

It looks like your script/rails script cannot find the included file from rails gem. You need to install all needed gems separately for each version of Ruby you're using (e.g. 1.8.7 and 1.9.2).

Matt
@Matt - thanks for your answer. That does seem to be the problem, although I can't work out how it happened. I've pasted some console output into the original question. Thanks again.
ben
How does your `Gemfile.lock` look like?
Matt
@Matt - didn't realize I still had Rails 2 specified in the Gemfile. Works now, thanks for your help!
ben