---
name: "gemlock"
section: "1"
platform: "linux"
package: "rubygems"
version: "0.9.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/gemlock"
---

# gemlock(1)

Generate a lockdown list of a set of gems

## NAME

gemlock - Generate a lockdown list of a set of gems

## SYNOPSIS

**gemlock** \[*options*\] *GEM\_NAME-VERSION*...

## DESCRIPTION

**gemlock** will generate a list of require\_gem statements that will lock down the versions for the gem given in the command line.  It will specify exact versions in the requirements list to ensure that the gems loaded will always be consistent. A full recursive search of all effected gems will be generated.

## OPTIONS

- **-v**, **--verbose**

  Verbose output

- **-s**, **--\[no-\]strict**

  Fail if unable to satisfy a dependency

- **-h**, **--help**

  Show this message

- **-V**, **--version**

  Show version

## EXAMPLES

-

  gemlock rails-1.0.0 \> lockdown.rb

will produce in lockdown.rb:

-

  ```
  require "rubygems"
  gem 'rails', '= 1.0.0'
  gem 'rake', '= 0.7.0.1'
  gem 'activesupport', '= 1.2.5'
  gem 'activerecord', '= 1.13.2'
  gem 'actionpack', '= 1.11.2'
  gem 'actionmailer', '= 1.1.5'
  gem 'actionwebservice', '= 1.0.0'
  ```

Just load lockdown.rb from your application to ensure that the current versions are loaded. Make sure that lockdown.rb is loaded before any other require statements.
