0

I just installed RoR 3 with sudo gem install rails. I tried this multiple times, but every time I run $ rails I get an error and I hate it:

imac:~ rsonic$ rails /Users/rsonic/.gem/ruby/1.8/bin/rails:19:in `load': no such file to load -- rails (LoadError) from /Users/rsonic/.gem/ruby/1.8/bin/rails:19 

How can I fix this? I want to use Rails again!

1
  • try to remove /Users/rsonic/.gem/ruby/1.8/bin/ from your $PATH. If that make it work it means that you have to uninstall rails from your /Users/rsonic/.gem gems Commented Oct 8, 2010 at 16:44

1 Answer 1

3

1.Install rvm(Ruby version manager) sudo gem install rvm

2.Go to install path of rvm and do rvm-install

3.Check if the install was successful by running rvm

4.Check for current version of ruby ruby -v

5.Install ruby 1.9.2 using rvm rvm install 1.9.2

6.User ruby 1.9.2 with the help of rvm do rvm 1.9.2 (you can switch back to system's default ruby version by running command >rvm system)

7.Install gems using rvm do rvm gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n This will install gems locally for ruby1.9.2 without touchin the sytem ruby

8.Install RAILS3 beta release rvm gem install rails --pre

9.Install railties which are required for RAILS3 rvm gem install railties --pre

10.For generating a new app with RAILS3 skeleton now do rails myapp

Note all ruby script/ commands have changed to rails *

e.g: RAILS<3 ruby script/server -p 3004 RAILS3 rails server -p 3004

Hope it helps...

Sign up to request clarification or add additional context in comments.

Comments