AndreM96 AndreM96 - 6 months ago 27
Linux Question

OpenSuse - RubyGems install - wrong file names

I have a fresh OpenSuse 13.1 installation with all updates installed.

ruby -v
-->
ruby 2.0.0p247 (2013-06-27) [x86_64-linux]


gem -v
-->
2.3.0


Running
gem env
outputs following:
EXECUTABLE DIRECTORY
:
/usr/bin
. It is also in my
$PATH
.

I tried to install
sass
and
compass
as described by the installation guides:

sudo gem install sass
sudo gem install compass


(I needed to use
sudo
because it didn't work without)


Only problem: neither running the commands
sass
nor
compass
work.

After a while I figured out that I had to use
sass2.0
and
compass2.0
to run them. The ruby scripts in
/usr/bin
are named with
2.0
at the end of the filename.

Why are those ruby scripts named with
2.0
at the end? How can I prevent this? I would like to use just
compass
and
sass
in the terminal.

I didn't get any results using Google.

Answer

It looks like openSUSE patches rubygems to keep multiple ruby versions installed, so it appends version number to files in bin/.

I've tried install sass package on my Linux x86_64 system and it produced sass, scss and sass-convert executables without extension.

I'd also warn to install gems this way, directly into filesystem. I'd recommend not avoiding package management and install through properly built packages. At openSUSE's wiki there is paragraph about how to package Ruby gems into rpms .