archlinux + rubygems = gem executables will not run

Two weeks ago, I had a problem with installing rubygems on my laptop. Yesterday, another person had the same problem, so I will document what is wrong here.

The problem itself manifests in the way, that it installs gems with the error message

WARNING: You don’t have /home/steven/.gem/rbx/1.8/bin in your PATH, gem executables will not run.

If you then want to use the binary provided with the gem, it will not work and it happens with all ruby versions, be it rubinius, jruby or 1.9. What makes it worse is the fact, that it only occurs on archlinux installations, till now. And it is not a problem of rvm!

So if you are on archlinux, look into /etc/gemrc. There will be a line saying

gemrc: –user-install

To solve the problem, create a file ~/.gemrc and put the line


in it. By doing that, the file /etc/gemrc will be ignored. And if you are manipulating that file, look into all the other options you can set.