<?xml version="1.0" encoding="UTF-8"?>
<snippet>
  <account-id type="integer">2</account-id>
  <body>If you've compiled Ruby from source, you might get this error when executing *script/console*:

&lt;code&gt;
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
&lt;/code&gt;

One way of fixing this is to compile readline, which is distributed along with the Ruby source:

&lt;code&gt;
cd /opt/src/ruby-1.8.5-p2/ext/readline
ruby extconf.rb
make
sudo make install
&lt;/code&gt;

This works even after compiling Ruby, so no need to recompile... If you're wondering what readline is then this quote from the &quot;project homepage&quot;:http://tiswww.case.edu/php/chet/readline/rltop.html sums it up in one sentence: 
&quot;The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.&quot;</body>
  <comments-count type="integer">0</comments-count>
  <created-at type="datetime">2007-08-14T02:39:34+03:00</created-at>
  <id type="integer">57</id>
  <language-id type="integer">131</language-id>
  <rendered-body>&lt;p&gt;If you&amp;#8217;ve compiled Ruby from source, you might get this error when executing &lt;strong&gt;script/console&lt;/strong&gt;:&lt;/p&gt;


	&lt;p&gt;&lt;pre class=&quot;active4d&quot;&gt;&lt;span class=&quot;line-numbers&quot;&gt;   1 &lt;/span&gt; /usr/local/lib/ruby/1.8/irb/completion.rb:10:&lt;span class=&quot;Keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;String&quot;&gt;&lt;span class=&quot;String&quot;&gt;`&lt;/span&gt;require': no such file to load -- readline (LoadError)&lt;/span&gt;
&lt;/pre&gt;&lt;/p&gt;


	&lt;p&gt;One way of fixing this is to compile readline, which is distributed along with the Ruby source:&lt;/p&gt;


	&lt;p&gt;&lt;pre class=&quot;active4d&quot;&gt;&lt;span class=&quot;line-numbers&quot;&gt;   1 &lt;/span&gt; cd /opt/src/ruby-1.8.5-p2/ext/readline
&lt;span class=&quot;line-numbers&quot;&gt;   2 &lt;/span&gt; ruby extconf.rb
&lt;span class=&quot;line-numbers&quot;&gt;   3 &lt;/span&gt; make
&lt;span class=&quot;line-numbers&quot;&gt;   4 &lt;/span&gt; sudo make install
&lt;/pre&gt;&lt;/p&gt;


	&lt;p&gt;This works even after compiling Ruby, so no need to recompile&amp;#8230; If you&amp;#8217;re wondering what readline is then this quote from the &lt;a href=&quot;http://tiswww.case.edu/php/chet/readline/rltop.html&quot;&gt;project homepage&lt;/a&gt; sums it up in one sentence: 
&amp;#8220;The  GNU  Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.&amp;#8221;&lt;/p&gt;</rendered-body>
  <title>Solution to &quot;`require': no such file to load -- readline (LoadError)&quot; problem</title>
  <updated-at type="datetime">2008-07-08T22:02:18+03:00</updated-at>
</snippet>
