Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The wiki suggests using $sudo pacman -S ruby1.9 but the package isn't there... I'd rather not compile it from source but I can if no one knows.

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

I'd recommend that you use rvm to manage Ruby versioning.

First install rvm:

curl -L get.rvm.io | bash -s stable --autolibs=enabled
. ~/.rvm/scripts/rvm
rvm requirements

You'll probably want to source that on shell startup as well, so add it to your ~/.bashrc:

cat >> ~/.bashrc << 'EOF'
[[ -r ~/.rvm/scripts/rvm ]] && . ~/.rvm/scripts/rvm
EOF

Now install Ruby 1.9.3:

rvm install 1.9.3

If you want to set 1.9.3 as the system default, do this:

rvm use 1.9.3 --default
share|improve this answer
    
Oh yeah I just found the same thing haha –  sheldonk May 13 '13 at 3:51
2  
This is definitely the way to mange ruby installs, don't use the pre-built binaries that come with the system for anything other than management of the system itself. –  slm May 13 '13 at 4:39
    
works for 1.9.3 but fails for 2.1.0 unix.stackexchange.com/questions/114969/… –  Nazgob Feb 12 at 23:27
add comment

To manage different ruby versions installed simultaneously you have a choice of three ruby version managers:

After trying all three on Arch, I would recommend chruby: it is simpler than the other two, is not as invasive in terms of how it works with your $PATH or overwrites cd, and does not require any executable shims.

It also isn't as "full-featured" as the other two, in that you will need to install ruby-build to install additional rubies.

Overall, though, I prefer the lightweight, minimal-impact approach. There is a chruby package in the AUR and another for ruby-build.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.