Working with Ruby
Hi, I am Jan. This is my old Ruby blog. I still post about Ruby, but I now do it on idiosyncratic-ruby.com. You should also install Irbtools to improve your IRB.

Requirements: A Mini RubyGems plugin

The .gemspec file of a gem allows to specify requirements for that gem – but usually you do not get to see them. These five lines patch RubyGems, so that gem displays the requirements of a gem after it has been installed:

 1
2
3
4
5
Gem.post_install do |gem|
  gem.spec.requirements.each{ |req|
    puts "Please note, the #{gem.spec.name} gem requires: #{req}"
  }
end

gem install requirements

Creative Commons License