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.

So, I am trying to install Octopress. I need ruby 1.9.2. It looks like sudo apt-get install ruby wants to install ruby 1.8. I've read that RVM is a good way to go. But it seems rather excessive since I don't expect to use much else apart from the bare-bones needed for octopress. Do I have an alternative?

I use a TeXlive 2011 I installed myself, but I like being up to date there. For ruby, I literally only want it for Octopress, so I don't really want to have to deal with maintenance separately if I can avoid it. I'd prefer if sudo apt-get update would deal with it for me.

I know there are PPAs. But the thing is, there are loads of PPAs. How do I choose a trustworthy one?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

note that I'm writing this on Ubuntu 12.04, however this should work on 11.10 Open a terminal, then install the ruby1.9.1-full, rake and git packages.

sudo apt-get install ruby1.9.1-full git rake

Install the bundler gem with

sudo gem install bundler

Then, download a copy of octopress.

git clone git://github.com/imathis/octopress.git octopress

cd into the octopress directory, and then run

bundle install

You might need to enter in your password so you can install the gems, as shown here:

$ bundle install

Fetching source index for http://rubygems.org/

Enter your password to install the bundled RubyGems to your system:

Then, just follow the instructions on the octopress docs and you should be set! Enjoy octopress!

Note that where you would normally type "rake", you'll need to type rake1.9.1 instead. I'll update this once I figure out a way around it.

share|improve this answer
    
Can't you just alias rake to rake1.9.1? –  Seamus Feb 16 '12 at 14:01
    
Well, I know there is a better way to do it system-wide, I just can't remember. –  jrg Feb 16 '12 at 14:04
    
I needed the following line in my .zshrc to get this to work: alias rake='noglob rake1.9.1' –  Seamus Apr 29 '12 at 13:44
    
@Seamus Fair enough, that works. –  jrg Apr 29 '12 at 17:43

But the thing is, there are loads of PPAs. How do I choose a trustworthy one?

I'd go with https://launchpad.net/~ubuntu-ruby (no 1.9.2 though)

However, this guy seems trustworthy enough (being that he at least documented the ppa in a blog post). It seems there's a "catch" where you have to link the /usr/bin/ruby yourself using update-alternatives:

I'd prefer if sudo apt-get update would deal with it for me.I'd prefer if sudo apt-get update would deal with it for me.

Usually someone is behind that apt-get update, doing all sorts of tests before releasing it. You can't expect someone to always do the work for you. You could learn how to create an ubuntu/debian package and join the ruby packaging team: https://launchpad.net/~ubuntu-ruby (..or even create your own team!).

On the other hand, you can always send a message to the team and request ruby 1.9.2.

Finally there's always good-old-not-recommended checkinstall if you compile ruby. checkinstall will create the .deb package for you (use it instead of "make install").

I've read that RVM is a good way to go.

That's what I've been reading so far. I would suggest using rvm, you seem an experienced user. As far as I can see, using rvm you can upgrade to the latest stable version quite easily: https://rvm.io/rvm/upgrading/

To upgrade to the most stable version:

rvm get stable

To upgrade to the most recent release version:

rvm get latest

Lastly, it seems that rvm is installed in user directory ~/.rvm/ - unless you use sudo (which will probably install it in /usr/local/rvm): https://rvm.io/rvm/basics/

You can remove it. Uninstall rvm also seems easy: http://stackoverflow.com/questions/3950260/howto-uninstall-rvm

rvm implode
rm -rf ~/.rvm

Hope this helps. :)

share|improve this answer

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.