I have just downloaded rvm to manage my ruby versioning. I have created a new gemset and installed rails 2.3.8. gem list shows the following gems
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
But when i run sudo script/server I get the following error:
Missing the Rails 2.3.8 gem. Please
gem install -v=2.3.8 rails, update
your RAILS_GEM_VERSION setting in
config/environment.rb for the Rails
version you do have installed, or
comment out RAILS_GEM_VERSION to use
the latest version installed.
Am I missing something? why am I unable to start the ror webrick server?
You don’t need to run this as root, in fact that is most likely why this is breaking. RVM is running as your user, so when you do “sudo” script/server its looking at the gems installed in the context of root, not as your user.
Just do script/server and you should be fine.