Search code examples
ruby-on-rails-3.2rvmgemset

rails server shows an error after creating a gemset


I have installed rvm. After creation of a gemset for a new project, when i give the command rails server, it shows this error report_activate_error': Could not find RubyGem railties (>= 0) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:inactivate`

So i found a solution that i need to give the command gem install rails to install rails. Is it necessary to install rails for every new project? I am confused. Please guide me the real thing. Thanks.


Solution

  • Gemsets are separating environments, you need to install gems for every new gemset, if you will always use the same version of rails you can install gems in global gemset:

    rvm @global do gem install rails