Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Keep your Ruby application optimized and secure by knowing what gems have updates.
Branch: status-badge
Pull request Compare This branch is 3 commits ahead, 17 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Dependency Status


  • This gem is currently alpha. You need to be invited to SourceNinja Alpha in order to use this gem.

What is SourceNinja

SourceNinja is an awesome service that allows you to stay informed of updates to the open source packages that your application uses. When a newer version of a package is released, SourceNinja alerts you and gives you actionable information to help you determine whether you should upgrade to the newer package.

Visit SourceNinja to learn more.

What is the sourceninja gem

The sourceninja gem is a gem that can be included in your rails application to allow seamless integration with SourceNinja. The sourceninja gem will send all of your gem files and versions to SourceNinja to begin managing your open source libraries.

Getting Started

  1. Create a SourceNinja account. Currently, you need to be part of our alpha.

  2. Log into SourceNinja and create a product. The product you create will be paired with your application.

  3. After you create a product, you will be directed to a page asking what language your application is running. Select Rails from the menu on the left side.

  4. You will be presented with two values, you'll need these two values later.

  5. Install the sourceninja gem. You can do this by adding the following line to your Gemfile.

    gem "sourceninja", "~> 0.0.7"
  6. Run bundle install.

  7. Set the environment variables SOURCENINJA_TOKEN and SOURCENINJA_PRODUCT_ID using the values from step 4.

Updated Magically in Production

Now each time you push to production the sourceninja gem will be run and data will be populated back to SourceNinja. If you visit your SourceNinja page you will be given a list of outdated gems.

The sourceninja data is populated whenever the app is initialized.

Testing Locally

If you would like to test sourceninja gem locally, you will want to create an initializer script to set the variables.

Contents of config/initializers/sourceninja.rb

ENV["SOURCENINJA_TOKEN"]      ||= "1cea0be98caf02e830ac2aadbe44e4ee"
ENV["SOURCENINJA_PRODUCT_ID"] ||= "fb89e064-b48c-d0c3-81x4-a34a5b60a654"

Upon doing this, each time you start the rails server locally the data will be pushed. You could also use these steps if you want to manage a production instance and a development instance.

Note: DO NOT DO THIS FOR PRODUCTION: No configuration files with sensitive information should ever be required within the application source and required config values should be read in from the ENV by supported libraries.


Feel free to email us at support at sourceninja dot com if you have any questions or issues.


Something went wrong with that request. Please try again.