gmosx.ninja

Do not depened on Ruby Gems

Here is a message to all developers of Ruby libraries or programs: Please do not depend on Ruby Gems. Do not require that Ruby Gems are installed and please do not use require_gem commands. Ruby Gems may be an easy way to install a library to your laptop but there are people that do not want to use RubyGems.

For example some days ago I wanted to ‘freeze’ a Nitro application. By freezing I mean copying the correct versions of all required libraries to a local lib directory so I can upload my application to the production server. As many of these libraries change frequently and I am hosting multiple applications on the same server, using a single Ruby Gems repository is not a solution. And, really, I don’t want to use require_gem xxx, “>= 1.34.4.5″ all over my code. There are libraries (for example Mongrel, or ruby-openid) that unnecessarily require gems. I had to come up with workarounds to trick these libraries to work in my deployment scenario.

Make your library more flexible, do not depend on Gems.