Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Check rubygem files for common mistakes and errors
branch: master
Failed to load latest commit information.
bin development executable should always use detailed output
lib new experimental check: gems that contain a DLL but platform is set t…
spec new check - detect gems with a license file but no license in the gem…
CHANGELOG update changelog
Gemfile add a gemfile to manage development dependencies
Gemfile.lock avoid using rcov, it's not available on 1.9
README.rdoc add new check idea
Rakefile avoid using rcov, it's not available on 1.9
gem_lint.gemspec bump version



Sanity check your rubygems for common issues. Missing readmes, bundled pkg directories, encoding issues in the gemspec, etc.

Each test is classified as an error or warning. Errors are issues that (by my reading) violate the documented gem specs. Warnings are either best practices recommended by members of the community or arbitrary things that annoy me personally.


gem install gem-lint
gem lint somefile-0.0.1.gem
gem lint somefile-0.0.1.gem --detailed


To check a gem programmatically:

require "gem_lint"

runner ="widgets-1.0.gem")
puts runner.version
puts runner.tags


This a spike. It has few tests and is a proof of concept. Most of it was written at a Railscamp and therefore is probably of suspect quality.


Rubygems 1.3.2 or greater is required, otherwise it's pure ruby should run on most ruby VMs.


To add new checks, create a new strategy in lib/gem_lint/strategies with a matching spec in spec/strategies.

View other strategies for an idea of the required contract. There are existing specs to ensure all strategies confirm to the contract, so keep the full spec suit (using “rake”) green.

Full source is on github at

Ideas for new checks

  • improved handling of compiled extensions

  • files entry in spec not matching actual files in data

  • contains compiled .o files for wrong arch (check glib2 0.90.6 for example)

Further Reading

Something went wrong with that request. Please try again.