6

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?

Jorge Castro
  • 71,754
Seamus
  • 926

2 Answers2

5

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: https://stackoverflow.com/questions/3950260/howto-uninstall-rvm

rvm implode
rm -rf ~/.rvm

Hope this helps. :)

3

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.

jrg
  • 60,611