Quote:
Originally Posted by zoran119
hi all,
i want to have a play with ruby on rails. one of the ways to install it is to run but this gives me an error:
Code:
rake requires RubyGems version >= 1.3.2
i could run but i'm worried that this might break something.
can anyone suggest how to install rails?
|
First off, since ruby/rails has many version constraints from project to project, the rvm command, as mentioned, is very handy. You can have multiple version of ruby and handle different sets of gems for projects without complicated installing/uninstalling.
Code:
rvm install ruby-1.9.3
rvm use ruby-1.9.3
rvm gemset create rails_test
rvm gemset use rails_test
gem update --system
gem install rails
and away you go. All of this is stored in your ~/.rvm/, so there is no need to mess with being root.
If you do want to use your system, and don't need the latest rails. Find the whole list of versions like so:
Code:
gem search -ra rails | less
A version of rails like 2.3.14 should do fine. Install it like:
Code:
gem install rails -v=2.3.14
If you do want the latest rails, then to update the version of rubygems on the system, do:
Code:
gem update --system
This installation installs to /usr/lib$SUFFIX/ruby/gems/ as well as /usr/lib$SUFFIX/ruby/site_ruby/, but that cruft shouldn't likely ever cause you problems. It's just good to know it's there.
Take care,
vb