Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am not ruby guy, but I have good experience with apache and php, but I find it really difficult to setup ruby 1.8.7, cause I find a lot of ways to do the same and I am pretty much confused. I want to install open source project management system fedena in ubuntu 12.10 which required ruby 1.8.7 to run.

share|improve this question
1  
You should look at rvm –  nikhil Mar 12 '13 at 14:22
    
I assume you looked into the fedena docs already, right? –  don.joey Mar 12 '13 at 14:22
    
yes fedena docs for installation is not good for setting up a production environment in a vps. Its really really slow if I set it up in that way . –  Rohith Raveendran Mar 12 '13 at 14:23
    
i saw rvm but is there any another apt-get method ? –  Rohith Raveendran Mar 12 '13 at 14:24
add comment

1 Answer

In ubuntu 12.10 the ruby1.8 package gives you ruby 1.8.7-p358. The binary it installs is compatible with fedena.

I would also suggest looking into something like rvm in order to maintain different versions of rubies. If you don't need something quite as heavy as rvm you could try rbenv which is a similar idea but allows you to install rubies using the ruby-build plugin or any other method you choose such as source or apt-get. It just makes sure that your projects use the ruby you want it to using a file in the source directory. If you want to go even lighter weight than rbenv there is one more potential alternative you can check out called chruby. It is a similar idea to rbenv but implements it in a slightly different way.

My first suggestion is the only pure apt-get solution but I would suggest using at least chruby to make sure projects use the correct ruby once you have multiple installed.

Edit:

See @berkes comment about using symlinks for default ruby. If you don't like rbenv, rvm, or chruby it can be a great alternative allowing you to quickly change the system rubies. The command update-alternatives is a great way to automate this process. Add an alternative using the command:

sudo update-alternatives --set ruby /path/to/ruby

You can also check which alternatives are configured and selected using:

sudo update-alternatives --config ruby
share|improve this answer
    
In addition to the excellent advice from @Danny Dyla, when you apt-get install different versions of Ruby, you can find their binaries in your path: ruby1.8.7 under /usr/bin/ruby*. /usr/bin/ruby is then a symlink to /etc/alternatives/ruby which, again, is a symlink to your systems default. E.g.: /usr/bin/ruby1.9.1 –  berkes Mar 22 '13 at 8:20
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.