views:

78

answers:

2

Hi, I'm currently setting up a new server, and started off with an Ubuntu 8.04 image with a version of Ruby and Rails already preinstalled (I thought it would be easier), and after getting my app running (with a few gems installed), the command line is throwing a wobbly, and trying to install the "Paperclip" gem, is giving the following error:

 activesupport requires ruby version >= 1.8.7

Running ruby -v tells me I'm on 1.8.6, but for the life of me, I have no idea how to update Ruby from the command line.

So, any advice for a) how to get Paperclip to work and b) ensure activesupport doesn't run into this error again, would be most welcome!

A: 

sudo apt-get install ruby-full should work

Matt
It says ruby-full is already the latest version.
Steve F
It probably means that the sources for apt-get are set to an older version of Ubuntu distribution which isn't updated with newer versions of packages anymore. You'd probably have to change your `/etc/apt/sources.list` to point to a newer version.
Matt
Do you know which sources to update to? Thanks.
Steve F
I guess you should just change the distribution name. For example if you have `http://www.domain.ext/path/to/repository lucid main`, then **lucid** is the name of a distribution (Lucid Lynx). You probably have some older one, just change it to some other release (see http://en.wikipedia.org/wiki/Ubuntu_(operating_system)#Releases), like lucid, in all the lines where it can be found.
Matt
A: 

Try rvm ruby version manager , http://rvm.beginrescueend.com/ .you can have multiple versions of ruby and gems are shared or unique to each version.

germanlinux
I tried RVM, but couldn't get it to work. "Using" a different Ruby didn't change the system version. I installed the RVM gem, if that's the wrong approach...
Steve F
If you use RVM, you should not use sudo when installing gems in RVM-installed rubies.
Teoulas
germanlinux