<feed version="0.3" xml:lang="en-US" xmlns="http://purl.org/atom/ns#">
  <title>Hieraki recent changes</title>
  <tagline mode="escaped" type="text/html"/>
  <id>tag:docs.rubygems.org,2004:Hieraki</id>
  <generator url="http://www.hieraki.org">Hieraki</generator>
  <link href="http://docs.rubygems.org/" rel="alternate" type="text/html"/>
  <modified>2007-05-20T10:23:21-04:00</modified>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-277</id>
    <issued>2007-05-20T10:23:21-04:00</issued>
    <modified>2007-05-20T10:23:21-04:00</modified>
    <title>Jim Weirich: Installing a remote gem</title>
    <link href="http://docs.rubygems.org/read/chapter/2#page5" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;When you run (as root, if appropriate and necessary)&lt;/p&gt;


&lt;pre&gt;gem install --remote progressbar
# shortcut: gem i -r progressbar&lt;/pre&gt;

	&lt;p&gt;the &lt;em&gt;progressbar&lt;/em&gt; gem will be installed on your computer.  Notice that you don&amp;#8217;t need to specify the version, but you can if you want to.  It will default to the last version available.&lt;/p&gt;


&lt;pre&gt;gem ins -r progressbar-0.0.3&lt;/pre&gt;

	&lt;p&gt;or&lt;/p&gt;


&lt;pre&gt;gem ins -r progressbar --version '&amp;gt; 0.0.1'&lt;/pre&gt;

	&lt;p&gt;In both cases, the output is simply:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;Attempting remote installation of 'progressbar'
Successfully installed progressbar, version 0.0.3&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;RubyGems allows you to have multiple versions of a library installed and choose in your code which version you wish to use.&lt;/p&gt;


	&lt;p&gt;Useful extra options for installation are &lt;tt&gt;&lt;del&gt;-gen-rdoc&lt;/tt&gt; for generating the gem&amp;#8217;s RDoc &lt;span class="caps"&gt;API&lt;/span&gt; documentation, and &lt;tt&gt;&lt;/del&gt;-run-tests&lt;/tt&gt; to run the gem&amp;#8217;s unit tests, if any.&lt;/p&gt;


	&lt;p&gt;Note too that when you remotely install a gem, it will download and install any specified dependencies.  Try installing &lt;strong&gt;copland&lt;/strong&gt; and see that it prompts you to accept &lt;strong&gt;log4r&lt;/strong&gt; as well (if it&amp;#8217;s not already installed).&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-276</id>
    <issued>2007-05-20T10:22:07-04:00</issued>
    <modified>2007-05-20T10:22:07-04:00</modified>
    <title>Jim Weirich: Searching remotely installable gems</title>
    <link href="http://docs.rubygems.org/read/chapter/2#page4" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;When you run&lt;/p&gt;


&lt;pre&gt;  gem query --remote --name-matches doom
  # shortcut: gem q -R -n doom&lt;/pre&gt;

	&lt;p&gt;you will see a detailed list of &lt;em&gt;matching&lt;/em&gt; gems on the remote server.&lt;/p&gt;


	&lt;p&gt;Sample output:&lt;/p&gt;


&lt;pre&gt;
*** REMOTE GEMS ***

ruby-doom (0.8, 0.0.7)
    Ruby-DOOM provides a scripting API for creating DOOM
    maps. It also provides higher-level APIs to make map
    creation easier.
&lt;/pre&gt;

&lt;p&gt;When you run&lt;/p&gt;

&lt;pre&gt;  gem query --remote --name-matches doom
  # shortcut: gem q -R -n doom&lt;/pre&gt;

        &lt;p&gt;you will see a detailed list of &lt;em&gt;matching&lt;/em&gt; gems on the remote server.&lt;/p&gt;

        &lt;p&gt;Sample output:&lt;/p&gt;

&lt;pre&gt;
*** REMOTE GEMS ***

ruby-doom (0.8, 0.0.7)
    Ruby-DOOM provides a scripting API for creating DOOM
    maps. It also provides higher-level APIs to make map
    creation easier.
&lt;/pre&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-275</id>
    <issued>2006-11-08T00:52:31-05:00</issued>
    <modified>2006-11-08T00:52:31-05:00</modified>
    <title>Jim Weirich: Installing gems in a non-standard directory.</title>
    <link href="http://docs.rubygems.org/read/chapter/15#page101" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="padding-left:2em;"&gt;&lt;em&gt;How do I install gems in a non-standard location, such as my home directory?&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;You have to redefine the location of the &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME variable and add the paths to the gem repositories in the &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; variable before launching the installation into a custom directory.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8 version of ruby.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; should point to the $PREFIX/lib/ruby and $PREFIX/lib/site_ruby/1.8&lt;/p&gt;


	&lt;p&gt;Here is a shell script that runs in the rubygems
distribution directory to install into /home/user :&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;PREFIX=$HOME
export GEM_HOME=$PREFIX/lib/ruby/gems/1.8 
export RUBYLIB=$PREFIX/lib/ruby:$PREFIX/lib/site_ruby/1.8
ruby setup.rb all --prefix=$PREFIX&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;You may add &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME and &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; into your ~/.profile file to automatically load on login.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-274</id>
    <issued>2006-11-08T00:49:12-05:00</issued>
    <modified>2006-11-08T00:49:12-05:00</modified>
    <title>Jim Weirich: Installing gems in a non-standard directory.</title>
    <link href="http://docs.rubygems.org/read/chapter/15#page101" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="padding-left:2em;"&gt;&lt;em&gt;How do I install gems in a non-standard location, such as my home directory?&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;You have to redefine the location of the &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME variable and add the
paths to the gem repositories in the &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; variable before launching the
installation into a custom directory.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8
version of ruby.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; should point to the $PREFIX/lib/ruby and $PREFIX/lib/site_ruby/1.8&lt;/p&gt;


	&lt;p&gt;Here is a shell script that runs in the rubygems
distribution directory to install into /home/user :&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;PREFIX=/home/user
export GEM_HOME=$PREFIX/lib/ruby/gems/1.8 
export RUBYLIB=$PREFIX/lib/ruby:PREFIX/lib/site_ruby/1.8
ruby setup.rb all --prefix=$PREFIX&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;You may add &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME and &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; into your ~/.profile file to
automatically load on login.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-273</id>
    <issued>2006-11-08T00:47:27-05:00</issued>
    <modified>2006-11-08T00:47:27-05:00</modified>
    <title>Jim Weirich: Q: How do I install gems in my home directory?</title>
    <link href="http://docs.rubygems.org/read/chapter/15#page101" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;A: You have to redefine the location of the &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME variable and add the
paths to the gem repositories in the &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; variable before launching the
installation into a custom directory.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8
version of ruby.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; should point to the $PREFIX/lib/ruby and $PREFIX/lib/site_ruby/1.8&lt;/p&gt;


	&lt;p&gt;Here is a shell script that runs in the rubygems
distribution directory to install into /home/user :&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;PREFIX=/home/user
export GEM_HOME=$PREFIX/lib/ruby/gems/1.8 
export RUBYLIB=$PREFIX/lib/ruby:PREFIX/lib/site_ruby/1.8
ruby setup.rb all --prefix=$PREFIX&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;You may add &lt;span class="caps"&gt;GEM&lt;/span&gt;_HOME and &lt;span class="caps"&gt;RUBYLIB&lt;/span&gt; into your ~/.profile file to
automatically load on login.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-272</id>
    <issued>2006-11-08T00:46:44-05:00</issued>
    <modified>2006-11-08T00:46:44-05:00</modified>
    <title>Jim Weirich: Q1</title>
    <link href="http://docs.rubygems.org/read/chapter/15#page101" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;A1&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Chad Fowler</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-271</id>
    <issued>2006-09-22T15:46:40-04:00</issued>
    <modified>2006-09-22T15:46:40-04:00</modified>
    <title>Chad Fowler: Using a gem in your code</title>
    <link href="http://docs.rubygems.org/read/chapter/4#page16" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;Here we demonstrate the use of the &lt;strong&gt;progressbar&lt;/strong&gt; gem.  This library may use terminal features that are not available in your system.&lt;/p&gt;


	&lt;p&gt;If you wish, enter the following code into a file and run it. (Note that you must require the rubygems library before executing this code, as detailed in chapter 3 of this manual.)&lt;/p&gt;


&lt;pre&gt;
require 'progressbar'

bar = ProgressBar.new("Example progress", 50)
total = 0
until total &amp;gt;= 50
  sleep(rand(2)/2.0)
  increment = (rand(6) + 3)
  bar.inc(increment)
  total += increment
end
&lt;/pre&gt;

	&lt;p&gt;Here is a &amp;#8220;screenshot&amp;#8221; of the partially complete progress bar.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;Example progr:  29% |ooooooooooo                             | ETA:  00:00:04&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;The first line of the program requires the progressbar library file.  RubyGems will look for the &lt;code&gt;progressbar.rb&lt;/code&gt; file in the standard library locations.  If not found, it will look through its gem repository for a gem that contains &lt;code&gt;progressbar.rb&lt;/code&gt;.  If a gem is used, RubyGems attempts to use the latest installed version by default.&lt;/p&gt;


	&lt;p&gt;Note that the program was able to use the latest available installed gem by default &lt;em&gt;without&lt;/em&gt; any explicit action in the code.  The developer may develop a library without worrying about using RubyGems.&lt;/p&gt;


	&lt;p&gt;However, to &lt;em&gt;run&lt;/em&gt; the code, the environment does need to be &amp;#8220;gem enabled&amp;#8221;. See &lt;a href="http://docs.rubygems.org/read/chapter/3#page70"&gt;Setting Up the RubyGems Environment&lt;/a&gt; for details on how to make this happen.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-270</id>
    <issued>2006-04-06T01:06:49-04:00</issued>
    <modified>2006-04-06T01:06:49-04:00</modified>
    <title>Jim Weirich: Why does require return false when loading a file from a gem?</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page100" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt; Require returns false when loading a file from a gem.  Usually require will return true when it has loaded correctly.  What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;Nothing.  Well, something.  But nothing you need to worry about.&lt;/p&gt;


	&lt;p&gt;A false return from the require method does &lt;em&gt;not&lt;/em&gt; indicate an error.  It just means that the file has  already been loaded.&lt;/p&gt;


	&lt;p&gt;RubyGems has a feature that allows a file to be automatically loaded when a gem is activated (i.e. selected).  When you require a file that is in an inactive gem, the RubyGems software will activate that gem for you.  During that activation, any autoloaded files will be loaded for you.&lt;/p&gt;


	&lt;p&gt;So, by the time your require statement actually does the work of loading the file, it has already been autoloaded via the gem activation, and therefore it returns false.&lt;/p&gt;


	&lt;p&gt;As we said, it is not a problem, but it sure is confusing to folks doing requires in an irb session.  Future versions of RubyGems will correct this behavior.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-269</id>
    <issued>2006-04-06T00:58:38-04:00</issued>
    <modified>2006-04-06T00:58:38-04:00</modified>
    <title>Jim Weirich: Why does require return false when loading a file from a gem?</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page100" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt; Require returns false when loading a file from a gem.  Usually require will return true when its loaded correctly.  What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;Nothing.  Well, something.  But nothing you need to worry about.&lt;/p&gt;


	&lt;p&gt;A false return from the require method does not indicate an error.  It means that the file is already loaded.  Proabably the file was listed as an auto-required file in the gem, so when the gem was activated, the file was already loaded.  So when you explicitly require the file, the file has already been loaded, so require returns false.&lt;/p&gt;


	&lt;p&gt;I repeat, there is nothing wrong.&lt;/p&gt;


	&lt;p&gt;The only time this causes concern is when someone requires the file in an irb session and notices the return type.&lt;/p&gt;


	&lt;p&gt;However, the next version of RubyGems will correct this problem so that newcomers wont be surprised by the result.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-268</id>
    <issued>2006-04-06T00:58:19-04:00</issued>
    <modified>2006-04-06T00:58:19-04:00</modified>
    <title>Jim Weirich: Why does require return false when loading a file from a gem?</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page100" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt; Require returns false when loading a file from a gem.  Usually requrie will return true when its loaded correctly.  What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;Nothing.  Well, something.  But nothing you need to worry about.&lt;/p&gt;


	&lt;p&gt;A false return from the require method does not indicate an error.  It means that the file is already loaded.  Proabably the file was listed as an auto-required file in the gem, so when the gem was activated, the file was already loaded.  So when you explicitly require the file, the file has already been loaded, so require returns false.&lt;/p&gt;


	&lt;p&gt;I repeat, there is nothing wrong.&lt;/p&gt;


	&lt;p&gt;The only time this causes concern is when someone requires the file in an irb session and notices the return type.&lt;/p&gt;


	&lt;p&gt;However, the next version of RubyGems will correct this problem so that newcomers wont be surprised by the result.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-267</id>
    <issued>2006-04-06T00:57:52-04:00</issued>
    <modified>2006-04-06T00:57:52-04:00</modified>
    <title>Jim Weirich: Why does returns false when loading a file from a gem?</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page100" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt; Require returns false when loading a file from a gem.  Usually requrie will return true when its loaded correctly.  What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;Nothing.  Well, something.  But nothing you need to worry about.&lt;/p&gt;


	&lt;p&gt;A false return from the require method does not indicate an error.  It means that the file is already loaded.  Proabably the file was listed as an auto-required file in the gem, so when the gem was activated, the file was already loaded.  So when you explicitly require the file, the file has already been loaded, so require returns false.&lt;/p&gt;


	&lt;p&gt;I repeat, there is nothing wrong.&lt;/p&gt;


	&lt;p&gt;The only time this causes concern is when someone requires the file in an irb session and notices the return type.&lt;/p&gt;


	&lt;p&gt;However, the next version of RubyGems will correct this problem so that newcomers wont be surprised by the result.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-266</id>
    <issued>2006-04-04T16:20:31-04:00</issued>
    <modified>2006-04-04T16:20:31-04:00</modified>
    <title>Jim Weirich: &lt;tt&gt;gemlock&lt;/tt&gt; script</title>
    <link href="http://docs.rubygems.org/read/chapter/17#page99" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;&lt;em&gt;(new in version 0.9.0)&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;The &lt;code&gt;gemlock&lt;/code&gt; script will generate a series of &lt;code&gt;require_gem&lt;/code&gt; commands that will lock down an application or library to a particular version of their dependent gems.&lt;/p&gt;


	&lt;p&gt;For example, if you wish to lock down a particular version of the Rails library, use:&lt;/p&gt;


&lt;pre&gt;
  $ gemlock rails-1.0.0
  require "rubygems" 
  require_gem 'rails', '= 1.0.0'
  require_gem 'rake', '= 0.7.0.1'
  require_gem 'activesupport', '= 1.2.5'
  require_gem 'activerecord', '= 1.13.2'
  require_gem 'actionpack', '= 1.11.2'
  require_gem 'actionmailer', '= 1.1.5'
  require_gem 'actionwebservice', '= 1.0.0'
&lt;/pre&gt;

	&lt;p&gt;&lt;code&gt;gemlock&lt;/code&gt; will find all the direct and indirect gems required by rails-1.0.0 and specify the most recent, currently installed version of those gems.  The output should be place in the application (or library) will it will be run &lt;strong&gt;before&lt;/strong&gt; any other require statement in the program.&lt;/p&gt;


	&lt;p&gt;If your application depends on more than one gem, just list all the gems in the command line and &lt;code&gt;gemlock&lt;/code&gt; will display the locking commands for all of them.&lt;/p&gt;


	&lt;h3&gt;Usage&lt;/h3&gt;


&lt;pre&gt;
  Usage: bin/gemlock [options] GEM_NAME-VERSION...

  Where options are:
    -v, --verbose                    Verbose output
    -s, --[no-]strict                Fail if unable to satisfy a dependency
    -h, --help                       Show this message
    -V, --version                    Show version
&lt;/pre&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-265</id>
    <issued>2006-04-04T16:19:28-04:00</issued>
    <modified>2006-04-04T16:19:28-04:00</modified>
    <title>Jim Weirich: &lt;tt&gt;gemlock&lt;/tt&gt; script</title>
    <link href="http://docs.rubygems.org/read/chapter/17#page99" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;&lt;em&gt;(new in version 0.9.0)&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;The &lt;code&gt;gemlock&lt;/code&gt; script will generate a series of &lt;code&gt;require_gem&lt;/code&gt; commands that will lock down an application or library to a particular version of their dependent gems.&lt;/p&gt;


	&lt;p&gt;For example, if you wish to lock down a particular version of the Rails library, use:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;$ gemlock rails-1.0.0
require "rubygems" 
require_gem 'rails', '= 1.0.0'
require_gem 'rake', '= 0.7.0.1'
require_gem 'activesupport', '= 1.2.5'
require_gem 'activerecord', '= 1.13.2'
require_gem 'actionpack', '= 1.11.2'
require_gem 'actionmailer', '= 1.1.5'
require_gem 'actionwebservice', '= 1.0.0'&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;&lt;code&gt;gemlock&lt;/code&gt; will find all the direct and indirect gems required by rails-1.0.0 and specify the most recent, currently installed version of those gems.  The output should be place in the application (or library) will it will be run &lt;strong&gt;before&lt;/strong&gt; any other require statement in the program.&lt;/p&gt;


	&lt;p&gt;If your application depends on more than one gem, just list all the gems in the command line and &lt;code&gt;gemlock&lt;/code&gt; will display the locking commands for all of them.&lt;/p&gt;


	&lt;h3&gt;Usage&lt;/h3&gt;


	&lt;pre&gt;&lt;code&gt;Usage: bin/gemlock [options] GEM_NAME-VERSION...&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;Where options are:
  -v, --verbose                    Verbose output
  &lt;del&gt;s, -&lt;/del&gt;[no-]strict                Fail if unable to satisfy a dependency
  -h, --help                       Show this message
  -V, --version                    Show version&lt;/code&gt;&lt;/pre&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-264</id>
    <issued>2006-04-04T16:18:16-04:00</issued>
    <modified>2006-04-04T16:18:16-04:00</modified>
    <title>Jim Weirich: &lt;tt&gt;gemlock&lt;/tt&gt; script</title>
    <link href="http://docs.rubygems.org/read/chapter/17#page99" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;The &lt;code&gt;gemlock&lt;/code&gt; script will generate a series of &lt;code&gt;require_gem&lt;/code&gt; commands that will lock down an application or library to a particular version of their dependent gems.&lt;/p&gt;


	&lt;p&gt;For example, if you wish to lock down a particular version of the Rails library, use:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;$ gemlock rails-1.0.0
require "rubygems" 
require_gem 'rails', '= 1.0.0'
require_gem 'rake', '= 0.7.0.1'
require_gem 'activesupport', '= 1.2.5'
require_gem 'activerecord', '= 1.13.2'
require_gem 'actionpack', '= 1.11.2'
require_gem 'actionmailer', '= 1.1.5'
require_gem 'actionwebservice', '= 1.0.0'&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;&lt;code&gt;gemlock&lt;/code&gt; will find all the direct and indirect gems required by rails-1.0.0 and specify the most recent, currently installed version of those gems.  The output should be place in the application (or library) will it will be run &lt;strong&gt;before&lt;/strong&gt; any other require statement in the program.&lt;/p&gt;


	&lt;p&gt;If your application depends on more than one gem, just list all the gems in the command line and &lt;code&gt;gemlock&lt;/code&gt; will display the locking commands for all of them.&lt;/p&gt;


	&lt;h3&gt;Usage&lt;/h3&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-263</id>
    <issued>2006-04-04T16:08:52-04:00</issued>
    <modified>2006-04-04T16:08:52-04:00</modified>
    <title>Jim Weirich: &lt;tt&gt;gemlock&lt;/tt&gt; script</title>
    <link href="http://docs.rubygems.org/read/chapter/17#page99" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p&gt;The &lt;code&gt;gemlock&lt;/code&gt; script will generate a series of &lt;code&gt;require_gem&lt;/code&gt; commands that will lock down an application or library to a particular version of their dependent gems.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-262</id>
    <issued>2005-12-29T10:03:09-05:00</issued>
    <modified>2005-12-29T10:03:09-05:00</modified>
    <title>Jim Weirich: No such file to load -- rubygems</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page98" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt;When I run the &lt;tt&gt;gem&lt;/tt&gt; command, I get the following error message:&lt;/p&gt;


&lt;pre&gt; ruby: No such file to load -- rubygems (LoadError)&lt;/pre&gt;

	&lt;p style="font-style: italic;"&gt;What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;It looks like executing copy of Ruby does not have the RubyGems library installed.  RubyGems was probably installed at one time (because the &lt;tt&gt;gem&lt;/tt&gt; command is recognized), but it may have been installed on a different installation of Ruby than the one you are currently running.&lt;/p&gt;


	&lt;h4&gt;Things to check&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;Check that the installation of Ruby that is running is the same one that has RubyGems installed.  On a unix system, the &lt;tt&gt;which&lt;/tt&gt; command (or &lt;tt&gt;type&lt;/tt&gt; command) will help figure this out.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Verify that the currently running installation of Ruby does indeed have the RubyGems library installed.  You should find a &amp;#8220;&lt;tt&gt;rubygems.rb&lt;/tt&gt;&amp;#8221; file in the site_ruby/1.8 directory of the Ruby installation.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;These mixup can easily happen after installing a new instance of Ruby, but the old instance preceeds the new one in the &lt;span class="caps"&gt;PATH&lt;/span&gt; list.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-261</id>
    <issued>2005-12-29T10:02:21-05:00</issued>
    <modified>2005-12-29T10:02:21-05:00</modified>
    <title>Jim Weirich: No such file to load -- rubygems</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page98" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt;When I run the &lt;tt&gt;gem&lt;/tt&gt; command, I get the following error message: ruby:&lt;/p&gt;


&lt;pre&gt;No such file to load -- rubygems (LoadError)&lt;/pre&gt;

	&lt;p style="font-style: italic;"&gt;What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;It looks like executing copy of Ruby does not have the RubyGems library installed.  RubyGems was probably installed at one time (because the &lt;tt&gt;gem&lt;/tt&gt; command is recognized), but it may have been installed on a different installation of Ruby than the one you are currently running.&lt;/p&gt;


	&lt;h4&gt;Things to check&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;Check that the installation of Ruby that is running is the same one that has RubyGems installed.  On a unix system, the &lt;tt&gt;which&lt;/tt&gt; command (or &lt;tt&gt;type&lt;/tt&gt; command) will help figure this out.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Verify that the currently running installation of Ruby does indeed have the RubyGems library installed.  You should find a &amp;#8220;&lt;tt&gt;rubygems.rb&lt;/tt&gt;&amp;#8221; file in the site_ruby/1.8 directory of the Ruby installation.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;These mixup can easily happen after installing a new instance of Ruby, but the old instance preceeds the new one in the &lt;span class="caps"&gt;PATH&lt;/span&gt; list.&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-260</id>
    <issued>2005-12-29T09:54:38-05:00</issued>
    <modified>2005-12-29T09:54:38-05:00</modified>
    <title>Jim Weirich: No such file to load -- rubygems</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page98" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt;When I run the &lt;tt&gt;gem&lt;/tt&gt; command, I get the following error message: ruby:&lt;/p&gt;


&lt;pre&gt;No such file to load -- rubygems (LoadError)&lt;/pre&gt;

	&lt;p style="font-style: italic;"&gt;What&amp;#8217;s wrong?&lt;/p&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-259</id>
    <issued>2005-12-20T14:24:25-05:00</issued>
    <modified>2005-12-20T14:24:25-05:00</modified>
    <title>Jim Weirich: RubyGems hangs while updating the source index.</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page96" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt;I have a problem with RubyGems. It doesn&amp;#8217;t matter what I try to install with, it freezez.&lt;/p&gt;


	&lt;p style="font-style: italic;"&gt;Particulary I tried to execute:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;gem install rails --include-dependencies&lt;/code&gt;&lt;/pre&gt;


	&lt;p style="font-style: italic;"&gt;but the command freezez at the following message:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;"Updating Gem source index for: http://gems.rubyforge.org"&lt;/code&gt;&lt;/pre&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;[I lost my internet connection while composing the answer to this question.  Unfortunately, I now no longer recall what I intended to write.  The answer (or at least part of the answer) is buried deep in the RubyGems mail archive.  I&amp;#8217;ll try to update this after a bit of research.  Sorry for leaving this question hanging.]&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:docs.rubygems.org,2004:Hieraki-258</id>
    <issued>2005-12-20T14:23:55-05:00</issued>
    <modified>2005-12-20T14:23:55-05:00</modified>
    <title>Jim Weirich: RubyGems hangs while updating the source index.</title>
    <link href="http://docs.rubygems.org/read/chapter/19#page96" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="font-style: italic;"&gt;I have a problem with RubyGems. It doesn&amp;#8217;t matter what I try to install with, it freezez.&lt;/p&gt;


	&lt;p style="font-style: italic;"&gt;Particulary I tried to execute:
    gem install rails&amp;#8212;include-dependencies&lt;/p&gt;


	&lt;p style="font-style: italic;"&gt;but the command freezez at the following message:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;"Updating Gem source index for: http://gems.rubyforge.org"&lt;/code&gt;&lt;/pre&gt;


	&lt;h3&gt;Answer&lt;/h3&gt;


	&lt;p&gt;[I lost my internet connection while composing the answer to this question.  Unfortunately, I now no longer recall what I intended to write.  The answer (or at least part of the answer) is buried deep in the RubyGems mail archive.  I&amp;#8217;ll try to update this after a bit of research.  Sorry for leaving this question hanging.]&lt;/p&gt;</content>
  </entry>
</feed>
