Hi.

openSUSE as a ruby development platform

openSUSE is a gem for ruby development

In this post I would like to show what openSUSE has to offer to ruby enthusiasts.

The latest openSUSE version ships with ruby 1.8.7, rubygems 1.3.1 and rails 2.3.2. The latest two being not so recent, here is where the openSUSE project shines. Say hello to devel:languages:ruby and devel:languages:ruby:extensions build service projects.

The first is a project containing a more recent 1.8.7 ruby (p249 vs p72 in 11.2). However, as a build service project, it is built on top of multiple targets so you can add this repository not only to 11.2 but also to SLE and older openSUSE releases.

In this project you will also find a ruby19 package which is nothing else than ruby 1.9.1 p376 installable in parallel with 1.8.7.

The devel:languages:ruby:extensions contains ruby libraries and gems. For example you can find rails 2.3.5 there. Libraries are usually packaged as ruby-something and gems are packaged as rubygem-something. Gem packages have some nice attributes:

They are visible by the software management stack (rpm ZYpp, and all the ZYpp integrated tools: PackageKit, YaST, etc)

They are visible to the gem tool. The rpm is installed where the gem tools expects to find it

They are the best choice if you want distribute a fully packaged application, or an appliance using SUSE Studio

You can easily create them from a standard gem using the gem2rpm-opensuse script included in the rubygem-gem2rpm package

Living on the edge

While the ruby environment provided by openSUSE is great, you may want to go one step further. What comes to my head:

If you have both ruby and ruby19, you would need to have a different package for each ruby interpreter

Sometimes you want to try a really experimental virtual machine, however openSUSE offers no package for it (eeer, and experimental VMs make packaging difficult, especially if the developers are MacOS users whose build script download prebuilt binaries of LLVM over the internet eeeek!)

If you run or develop applications in the same machine, you may want to isolate the gem environment for each applications

You may want quickly to test a program with different interpreters.

You may not have root access! And sadly quacking like an administrator won’t give you superpowers.

Enter rvm, the ruby version manager

rvm is a nice tool that can quickly compile ruby interpreters from source and switch between them, all without root access (you can also set the current interpreter to the “system” one). Gems you install for one interpreter are isolated from the other interpreters, and you can create “gem sets”.