<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Pither.com: Tag ruby</title>
    <link>http://www.pither.com/articles/tag/ruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>by Simon Pither, freelance developer and systems administrator</description>
    <item>
      <title>RoR nearly falls early</title>
      <description>&lt;p&gt;While trying to get a new Ruby on Rails application up and running on one of my servers, I came across this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ruby script/server   
./script/../config/boot.rb:29: undefined method `gem' for main:Object (NoMethodError)
        from script/server:2:in `require'
        from script/server:2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Being the first thing I ran after &lt;code&gt;rails &amp;lt;myapp&amp;gt;&lt;/code&gt; this is quite an early point in the process to start failing!&lt;/p&gt;

&lt;p&gt;The fix turned out to be:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo gem update --system
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The slightly puzzling bit is that this machine already has other RoR applications running on it!  I suspect the key difference is that they were developed elsewhere and only run on this machine under apache.&lt;/p&gt;</description>
      <pubDate>Tue, 05 Jun 2007 14:10:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ead6e7e5-4faa-4078-a9d1-ada334b9443b</guid>
      <author>Simon</author>
      <link>http://www.pither.com/articles/2007/06/05/ror-nearly-falls-early</link>
      <category>ror</category>
      <category>ruby</category>
    </item>
  </channel>
</rss>
