Error trying to start the server after upgrading to Rails 3

I just upgraded to Rails 3 using this railscast instructions. When I try to start the server, this happens:

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

I cannot find this exact error using Google. Does anyone know what causes this? thank you 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>' 
+4
source share
2 answers

Did you really install rails 3.0.x stone? You may have skipped this step :).

It looks like your script/rails script cannot find the included rails gem file. You need to install all the necessary gems separately for each version of Ruby that you use (for example, 1.8.7 and 1.9.2).

+3
source

Perhaps you can just reinstall your rubygem or update it.

Rubygem versions should match your Ruby versions. For each version of Ruby, you need to install separate Gems.

May I ask if you use any β€œship” with RVM settings? Better avoided, see here: http://rvm.beginrescueend.com/rubies/rubygems/

Can you list your gem list here after switching to the default Ruby version you want to use? Also "rvm list" "ruby -v" "gem -v" and your OS.

It’s also wise to post to the forum in the section that you uploaded the Railscasts video because others may have the same problem.

0
source

All Articles