LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   installing ruby on rails (https://www.linuxquestions.org/questions/slackware-14/installing-ruby-on-rails-918478/)

zoran119 12-13-2011 05:31 AM

installing ruby on rails
 
hi all,

i want to have a play with ruby on rails. one of the ways to install it is to run
Code:

gem install rails
but this gives me an error:
Code:

rake requires RubyGems version >= 1.3.2
i could run
Code:

gem update
but i'm worried that this might break something.

can anyone suggest how to install rails?

NoStressHQ 12-13-2011 08:41 PM

Hi,

Have a look at this http://beginrescueend.com/...

I use this on servers to allow redmine to run with a previous version of ruby (redmine doesn't support yet ruby 1.9, or at least didn't support it until recently, I haven't checked now...)

Cheers

Garry.

vbatts 12-14-2011 08:26 AM

Quote:

Originally Posted by zoran119 (Post 4548635)
hi all,

i want to have a play with ruby on rails. one of the ways to install it is to run
Code:

gem install rails
but this gives me an error:
Code:

rake requires RubyGems version >= 1.3.2
i could run
Code:

gem update
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

vbatts 12-18-2011 11:12 PM

Quote:

Originally Posted by zoran119 (Post 4548635)
Code:

rake requires RubyGems version >= 1.3.2

also, there is now a packaged update for rubygems on the slackbuilds.org site (http://slackbuilds.org/repository/13...bygems-update/)

Take care,


All times are GMT -5. The time now is 04:31 AM.