<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:gemtacular.rubygems.org,2004:Hieraki</id>
  <generator url="http://www.hieraki.org">Hieraki</generator>
  <link href="http://gemtacular.rubygems.org/" rel="alternate" type="text/html"/>
  <modified>2009-01-05T12:37:07-05:00</modified>
  <entry>
    <author>
      <name>Daniel Berger</name>
    </author>
    <id>tag:gemtacular.rubygems.org,2004:Hieraki-278</id>
    <issued>2009-01-05T12:37:07-05:00</issued>
    <modified>2009-01-05T12:37:07-05:00</modified>
    <title>Daniel Berger: Specification Reference</title>
    <link href="http://gemtacular.rubygems.org/read/chapter/20#page85" rel="alternate" type="text/html"/>
    <content mode="escaped" type="text/html">&lt;p style="padding-left:3em;"&gt;&lt;em&gt;This page is generated by &lt;tt&gt;hieraki&lt;/tt&gt; rake task in the
RubyGems &lt;span class="caps"&gt;CVS&lt;/span&gt;.  Any changes to this page will be lost.  Contact a
member of the RubyGems team if you have suggestions.&lt;/em&gt;&lt;/p&gt;


	&lt;p style="padding-left:3em;"&gt;&lt;em&gt;Last generated: 2005-06-01 00:11:33 &lt;span class="caps"&gt;EDT&lt;/span&gt; (Wednesday)&lt;/em&gt;&lt;/p&gt;


	&lt;h3&gt;Introduction&lt;/h3&gt;


	&lt;p&gt;In order to create a gem, you need to define a gem specification, commonly
called a &amp;#8220;gemspec&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;A gemspec consists of several &lt;em&gt;attributes&lt;/em&gt;.  Some of these are required;
most of them are optional.  The main body of this document is an alphabetical
list of gemspec attributes, each with a description, example usage, notes, and
more.&lt;/p&gt;


	&lt;p&gt;See also:&lt;/p&gt;


	&lt;h3&gt;&lt;a name="toc"&gt;Important Attributes&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/p&gt;


	&lt;h3&gt;Alphabetical&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;A* &lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;B* &lt;a href="#bindir"&gt;bindir&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;D* &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;E* &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#extensions"&gt;extensions&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;F* &lt;a href="#files"&gt;files&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;H* &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;N* &lt;a href="#name"&gt;name&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;P* &lt;a href="#platform"&gt;platform&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;R* &lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;S* &lt;a href="#summary"&gt;summary&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;T* &lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/strong&gt;V* &lt;a href="#version"&gt;version&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Themed&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Basics:&lt;/strong&gt; 
&lt;a href="#name"&gt;name&lt;/a&gt; .. &lt;a href="#version"&gt;version&lt;/a&gt; .. &lt;a href="#summary"&gt;summary&lt;/a&gt; .. &lt;a href="#description"&gt;description&lt;/a&gt; .. &lt;a href="#platform"&gt;platform&lt;/a&gt; .. &lt;a href="#required_ruby_version"&gt;required_ruby_version&lt;/a&gt; .. &lt;a href="#requirements"&gt;requirements&lt;/a&gt; .. &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Files, Libraries, and Executables:&lt;/strong&gt; 
&lt;a href="#files"&gt;files&lt;/a&gt; .. &lt;a href="#require_paths"&gt;require_paths&lt;/a&gt; .. &lt;a href="#autorequire"&gt;autorequire&lt;/a&gt; .. &lt;a href="#bindir"&gt;bindir&lt;/a&gt; .. &lt;a href="#executables"&gt;executables&lt;/a&gt; .. &lt;a href="#default_executable"&gt;default_executable&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;C compilation:&lt;/strong&gt; 
&lt;a href="#extensions"&gt;extensions&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; 
&lt;a href="#rdoc_options"&gt;rdoc_options&lt;/a&gt; .. &lt;a href="#has_rdoc"&gt;has_rdoc&lt;/a&gt; .. &lt;a href="#extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Testing:&lt;/strong&gt; 
&lt;a href="#test_files"&gt;test_files&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;About:&lt;/strong&gt; 
&lt;a href="#authors"&gt;authors&lt;/a&gt; .. &lt;a href="#email"&gt;email&lt;/a&gt; .. &lt;a href="#homepage"&gt;homepage&lt;/a&gt; .. &lt;a href="#rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Attribute Survey&lt;/h2&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="authors"&gt;authors&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String or Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The author or authors of the package contained in the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.author = 'John Jones'
  spec.authors = ['John Jones', 'Mary Smith']
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="autorequire"&gt;autorequire&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = nil&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The file that will be loaded when &lt;tt&gt;require_gem&lt;/tt&gt; is called.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.files = ['lib/rake.rb", "lib/rake/**/*.rb", ...]
  spec.autorequire = 'rake'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;In the above example, when the user&amp;#8217;s code calls &lt;tt&gt;require_gem &amp;#8216;rake&amp;#8217;&lt;/tt&gt;, an implicit &lt;tt&gt;require &amp;#8216;rake&amp;#8217;&lt;/tt&gt; is called afterwards. It is a shortcut so the user doesn&amp;#8217;t have to do what seems to be a redundant &lt;tt&gt;require&lt;/tt&gt;.&lt;/p&gt;


	&lt;p&gt;Specifying &lt;tt&gt;autorequire&lt;/tt&gt; is optional.  If there is no single default file that should be loaded, then it doesn&amp;#8217;t make sense to specify it.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="bindir"&gt;bindir&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;bin&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The directory containing the application files, if any.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.bindir = 'bin'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;An &amp;#8220;application file&amp;#8221; is a file that is intended to be run from the command line.  If your package contains such files, they will typically be placed in a &lt;tt&gt;bin&lt;/tt&gt; directory, hence the name &lt;strong&gt;bindir&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="date"&gt;date&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Time;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Time.now&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The date/time that the gem was created.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.date = File.utime('VERSION')
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;It&amp;#8217;s generally sufficient to leave it to the default.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="default_executable"&gt;default_executable&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = (see below)&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Of all the application files in the package, the &lt;strong&gt;default executable&lt;/strong&gt; is the one that can be run directly through the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.executables = ['bin/foo', 'bin/bar']
  spec.default_executable = 'bin/bar'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;If you only specify one application file in &lt;strong&gt;executables&lt;/strong&gt;, that file becomes the default executable.  Therefore, you only need to specify this value if you have more than one application file.&lt;/p&gt;


	&lt;p&gt;The notion of running applications directly through a gem is not well supported at the moment.  The idea is that you can download a gem, say &lt;tt&gt;monopoly.gem&lt;/tt&gt; (the board game), and run &lt;tt&gt;gem monopoly.gem&lt;/tt&gt;, which would run the &lt;tt&gt;monopoly&lt;/tt&gt; application. This is not an in-demand feature.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Is the full path necessary?&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="dependencies"&gt;dependencies&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Lists the gems that must be installed for this gem to work.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.add_dependency('log4r', '&amp;gt;= 1.0.5')
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;When installing a gem with &lt;tt&gt;gem install &amp;#8230;&lt;/tt&gt;, its dependencies will be checked.  If they are not installed, &lt;tt&gt;gem&lt;/tt&gt; will offer to install them.&lt;/p&gt;


	&lt;p&gt;See also &lt;a href="#requirements"&gt;requirements&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="description"&gt;description&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Detailed description of the gem.  See also &lt;a href="#summary"&gt;summary&lt;/a&gt;.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.description = &amp;lt;&amp;lt;-EOF
    Rake is a Make-like program implemented in Ruby. Tasks and
    dependencies are specified in standard Ruby syntax.
  EOF
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;When the gem is built, the description is re-formatted into a single line with sensible whitespace.  This means you can use here-docs with formatting, as demonstrated above, without worrying about the formatting.&lt;/p&gt;


	&lt;p&gt;The &lt;em&gt;description&lt;/em&gt; should be more detailed than the &lt;em&gt;summary&lt;/em&gt;.  You might consider copying all or part of your project&amp;#8217;s &lt;span class="caps"&gt;README&lt;/span&gt; into this field.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="email"&gt;email&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The author&amp;#8217;s email address.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.email = 'john.jones@example.com'
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="executables"&gt;executables&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;A list of files in the package that are applications.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  # XXX: is this correct?
  spec.executables &amp;lt;&amp;lt; 'rake'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;For example, the &lt;tt&gt;rake&lt;/tt&gt; gem has &lt;tt&gt;rake&lt;/tt&gt; as an executable. You don&amp;#8217;t specify the full path (as in &lt;tt&gt;bin/rake&lt;/tt&gt;); all application-style files are expected to be found in &lt;a href="#bindir"&gt;bindir&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="extensions"&gt;extensions&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The paths to &lt;tt&gt;extconf.rb&lt;/tt&gt;-style files used to compile extensions.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.extensions &amp;lt;&amp;lt; 'ext/rmagic/extconf.rb'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user&amp;#8217;s machine.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&lt;span class="caps"&gt;XXX&lt;/span&gt;: Any other comments?&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="extra_rdoc_files"&gt;extra_rdoc_files&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;A list of &lt;em&gt;extra&lt;/em&gt; files that will be used by RDoc to generate the documentation.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;When the user elects to generate the RDoc documentation for a gem (typically at install time), all the library files are sent to RDoc for processing.  This option allows you to have some non-code files included for a more complete set of documentation.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="files"&gt;files&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The list of files to be contained in the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  require 'rake'
  spec.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a

  # or without Rake...
  spec.files = Dir['lib/**/*.rb'] + Dir['bin/*']
  spec.files &amp;lt;&amp;lt; Dir['[A-Z]*'] + Dir['test/**/*']
  spec.files.reject! { |fn| fn.include? "CVS" }
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;You don&amp;#8217;t need to use Rake, obviously, but it does make it much easier to specify files, as it automatically excludes &lt;span class="caps"&gt;CVS&lt;/span&gt; files, backups, etc.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="has_rdoc"&gt;has_rdoc&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: boolean;   &lt;em&gt;Optional&lt;/em&gt;;   default = false&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Indicates whether the code in the gem has been commented with RDoc in mind.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.has_rdoc = true
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;This attribute has an advisory role only.  Any gem can be submitted for RDoc processing.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="homepage"&gt;homepage&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;&lt;span class="caps"&gt;URL&lt;/span&gt; of the project or author.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.hompage = 'http://rake.rubyforge.org'
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="name"&gt;name&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The name of the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.name = 'rake'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;The name does not include the version number; see &lt;a href="#version"&gt;version&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="platform"&gt;platform&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;;   default = &amp;#8220;Gem::Platform::Ruby&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The target platform for the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.platform = Gem::Platform::Win32
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;Most gems contain pure Ruby code; they should simply leave the default value in place.  Some gems contain C (or other) code to be compiled into a Ruby &amp;#8220;extension&amp;#8221;.  The should leave the default value in place unless their code will only compile on a certain type of system.  Some gems consist of pre-compiled code (&amp;#8220;binary gems&amp;#8221;).  It&amp;#8217;s especially important that they set the &lt;em&gt;platform&lt;/em&gt; attribute appropriately.  A shortcut is to set the platform to Gem::Platform::CURRENT, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.&lt;/p&gt;


	&lt;p&gt;If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built, e.g. &lt;tt&gt;fxruby-1.2.0-win32.gem&lt;/tt&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="rdoc_options"&gt;rdoc_options&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Specifies the &lt;tt&gt;rdoc&lt;/tt&gt; options to be used when generating &lt;span class="caps"&gt;API&lt;/span&gt; documentation.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.rdoc_options &amp;lt;&amp;lt; '--title' &amp;lt;&amp;lt; 'Rake -- Ruby Make' &amp;lt;&amp;lt;
                       '--main' &amp;lt;&amp;lt; 'README' &amp;lt;&amp;lt;
                       '--line-numbers'
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="require_paths"&gt;require_paths&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Required&lt;/em&gt;;   default = [&amp;#8220;lib&amp;#8221;]&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;List of &amp;#8217;&amp;#8217;require&amp;#8217;&amp;#8217; paths from the root of the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  # If all library files are in the root directory...
  spec.require_path = '.'

  # If you have 'lib' and 'ext' directories...
  spec.require_paths &amp;lt;&amp;lt; 'ext'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;The default is sufficient in most cases, as Ruby packages tend to be structured so that library code is found under the &lt;tt&gt;lib&lt;/tt&gt; directory.&lt;/p&gt;


	&lt;p&gt;The example above shows that you can use &lt;tt&gt;spec.require_path = &amp;#8217;...&amp;#8217;&lt;/tt&gt; instead of &lt;tt&gt;spec.require_paths = [...]&lt;/tt&gt;.  This is a shortcut, acknowledging that nearly all gems will have only one require path element.&lt;/p&gt;


	&lt;p&gt;Be careful about interpreting this attribute, however.  It is used to modify the &lt;tt&gt;&lt;span class="caps"&gt;LOAD&lt;/span&gt;_PATH&lt;/tt&gt;, and thus to resolve &lt;tt&gt;require&lt;/tt&gt; calls.  So if code calls &lt;tt&gt;require &amp;#8216;rake/packagetask&amp;#8217;&lt;/tt&gt;, for example, and the &lt;tt&gt;require_paths&lt;/tt&gt; is set to &lt;tt&gt;lib&lt;/tt&gt;, then there had better be a file &lt;tt&gt;lib/rake/packagetask.rb&lt;/tt&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="required_ruby_version"&gt;required_ruby_version&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Gem::Version::Requirement;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8221;&amp;gt; 0.0.0&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The version of Ruby required to use the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  # If it will work with 1.6.8 or greater...
  spec.required_ruby_version = '&amp;gt;= 1.6.8'

  # ...but not with 1.7/1.8...
  spec.required_ruby_version = '~&amp;gt; 1.6.8'

  # The typical case these days...
  spec.required_ruby_version = '&amp;gt;= 1.8.1'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;See the RubyGems wiki for documentation on specifying versions.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="requirements"&gt;requirements&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;Lists the external (to &lt;nowiki&gt;RubyGems&lt;/nowiki&gt;) requirements that must be met for this gem to work.  It&amp;#8217;s simply information for the user.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.requirements &amp;lt;&amp;lt; 'libmagick, v6.0 or greater'
  spec.requirements &amp;lt;&amp;lt; 'A powerful graphics card'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;For requirements that can be met by other gems, see &lt;a href="#dependencies"&gt;dependencies&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="rubyforge_project"&gt;rubyforge_project&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The RubyForge project corresponding to the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.rubyforge_project = 'rake'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;Obviously, if your gem doesn&amp;#8217;t have a Rubyforge project, leave this setting alone.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="rubygems_version"&gt;rubygems_version&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;current version of RubyGems&lt;/em&gt;&amp;#8220;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The version of RubyGems used to create this gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  No usage ... it is set automatically when the gem is created.
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="specification_version"&gt;specification_version&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Integer;   &lt;em&gt;Optional&lt;/em&gt;;   default = &amp;#8220;&lt;em&gt;Revision level of the RubyGems specification this gem conforms to.&lt;/em&gt;&amp;#8220;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The revision level of the GemSpec specification that this gem conforms to.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  No usage ... it is set automatically when the gem is created.
&lt;/pre&gt;

	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="summary"&gt;summary&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;A short description of the gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.summary = 'Ruby based make-like utility.'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;The summary is used to describe the gem in lists produced by the &lt;tt&gt;gem&lt;/tt&gt; tool.  See also &lt;a href="#description"&gt;description&lt;/a&gt;, which is less important.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="test_files"&gt;test_files&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: Array;   &lt;em&gt;Optional&lt;/em&gt;;   default = []&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;A collection of unit test files.  They will be loaded as unit tests when the user requests a gem to be unit tested.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.test_files = Dir.glob('test/tc_*.rb')     # (1)
  spec.test_file  = 'tests/test-suite.rb'        # (2)
  spec.test_files = ['tests/test-suite.rb']      # (3)
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;Example (1) specifies that all files matching &lt;tt&gt;tc_*.rb&lt;/tt&gt; in the &lt;tt&gt;test&lt;/tt&gt; directory are unit test files.&lt;/p&gt;


	&lt;p&gt;Example (2) shows that you can specify a test suite instead, which presumably loads individual test cases.  This uses the shortcut method &lt;tt&gt;test_file=&lt;/tt&gt;, and has the same effect as example (3).&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;h3&gt;&lt;a name="version"&gt;version&lt;/a&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;em&gt;Type: String;   &lt;em&gt;Required&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;h4&gt;Description&lt;/h4&gt;


	&lt;p&gt;The version of the gem.  See RationalVersioningPolicy for some advice on specifying the version number for your gem.&lt;/p&gt;


	&lt;h4&gt;Usage&lt;/h4&gt;


&lt;pre&gt;
  spec.version = '0.4.1'
&lt;/pre&gt;

	&lt;h4&gt;Notes&lt;/h4&gt;


	&lt;p&gt;The canonical way to represent versions in RubyGems is with the &lt;tt&gt;Gem::Version&lt;/tt&gt; class.  But the practical way to specify it in a gemspec is with a String.&lt;/p&gt;


	&lt;p&gt;The version string must consist purely of numbers and periods.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Goto &lt;a href="#toc"&gt;Table of Contents&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jim Weirich</name>
    </author>
    <id>tag:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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:gemtacular.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://gemtacular.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>
</feed>
