How do I update rubygems on the Ruby on Rails droplet image?

Posted September 13, 2014 4k views

The Ruby on Rails image seems to be using rvm to handle Ruby. All fine and good.

I need to install ZenTest 4.7.0 which requires a high version of rubygems… But running gem update --system doesn’t seem to be doing the right thing. As much as it tells me the latest (2.4.1) is installed, when I run “gem install ZenTest -v 4.7.0”, I get a complaint that I’m using an old version of Rubygems.

What’s going on - how can I successfully install ZenTest?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

gem update --system will update rubygems to the latest version. This instead seems like a problem in the version checking done by older versions of ZenTest. For instance, I hit the same issue if I run gem install ZenTest -v 4.7.0 but if I install a more recent version of ZenTest it installs cleanly:

gem install ZenTest -v 4.10.1

Reading through this bug report, it looks like it might just be a confussing error message. The ZenTest version you are trying to install needs rubygems >= 1.8 but also < 2.1