title: Rails3 and readline problem
body: <p>I'm using rails3 for the first time (i've been using rails2 for years) inside an rvm.  Trying to start the console, i get this error:</p>
  
  <p><code>require': no such file to load -- readline</code></p>
  
  <p>I've googled around and this seems to be a common problem.  Most solutions seem to involve 1) installing the following: <code>sudo apt-get install libncurses5-dev libreadline5-dev</code>
  2) going to the gem folder for readline, running <code>ruby extconf.rb</code> which generates a makefile 
  3) doing <code>make</code> and <code>make install</code> </p>
  
  <p>Now, i didn't have readline installed in my rvm, so i tried to install it.  But couldn't work out what the gem is: <code>gem install readline</code> doesn't give any results.  The only one i found was <code>gem install rdp-rb-readline</code>.  I installed the two dev libraries, installed the rdp-rb-readline gem, went to the subsequent gem folder, and ran <code>ruby extconf.rb</code>.  This did indeed generate a makefile. But i can't <code>make</code> it or <code>make install</code>:  i get these errors:</p>
  
  <p><code>
  max-laptop:readline$ make
  cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_USERNAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_RL_CLEAR_SIGNALS -DHAVE_RL_VI_EDITING_MODE -DHAVE_RL_EMACS_EDITING_MODE -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC  -c readline.c
  readline.c: In function ‘readline_readline’:
  readline.c:82: error: ‘rb_io_t’ undeclared (first use in this function)
  readline.c:82: error: (Each undeclared identifier is reported only once
  readline.c:82: error: for each function it appears in.)
  readline.c:82: error: ‘ofp’ undeclared (first use in this function)
  readline.c:82: error: ‘ifp’ undeclared (first use in this function)
  make: *** [readline.o] Error 1
  </code></p>
  
  <p>Kind of stuck now.  Am i missing something else fundamental that i need to make the required libraries/gem/whatever?</p>
  
  <p>Grateful for any advice - max</p>
  
  <p>SOLUTION:
  I actually just solved this - i uninstalled the rdp-rb-readline gem, then did <code>gem install rb-readline</code>, then added <code>gem 'rb-readline'</code> to my app's Gemfile.  I guess it just needed to know where to look for the readline stuff if it wasn't  in the usual place.  I didn't need to do anything with extconf.rb, which is good because the rb-readline gem doesn't have one.</p>
  
  <p>I've left this at the end of my question because a) someone else might have a better understanding of the problem rather than my trial and error approach and b) in case anyone else has the same problem.</p>