script/consoleでちょっとつまづく

script/consoleしたら下のようなメッセージが出てこけた。

script/console
Loading production environment (Rails 2.3.5)
Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
You may follow 'rvm notes' for dependencies and/or read the docs page http://rvm.beginrescueend.com/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.
$HOME/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)


readlineをインストールしてrubyコンパイルしなおせばいいらしい。
エラーメッセージのURL先に実行すべきコマンドが書いてある。
rubyのバージョンを書き換えて実行。

rvm package install readline
rvm remove 1.8.7
rvm install 1.8.7 --with-readline-dir=$rvm_path/usr


script/consoleを再実行。
…結果は変わらず。
エラーメッセージのURL先によるとこのエラーの原因で最も多いのがMacPortsにインストールされたreadlineを使っている場合で、次に多いのがreadline development headersが全く利用可能でない場合であり、上のコマンドでそれらの原因は解消できると書いてある。
…でも解消できない。
そこでreadline development headersをyumでインストールしてみる。

yum install readline-devel
rvm remove 1.8.7
rvm install 1.8.7 --with-readline-dir=$rvm_path/usr


yumした以上は--with-readline-dir=$rvm_path/usrは意味がないのかもしれないけど…
ともかくこれでscript/consoleが通るようになった。

script/console
Loading production environment (Rails 2.3.5)
/var/www/redmine-1.0.3/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
1.8.7 >