Rails3 rails控制台崩溃抛出错误

时间:2010-07-01 12:23:27

标签: ruby-on-rails-3

我正在尝试Rails 3,我正在使用RVM来管理ruby版本。使用RVM我安装了ruby版本1.8.7,1.9.1和1.9.2。

当我执行“rails console”时,我收到以下错误,控制台无法启动:

/home/syed/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load -- readline (LoadError)
  from /home/syed/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
  from /home/syed/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:3:in `require'
  from /home/syed/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:3:in `<top (required)>'
  from /home/syed/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/commands.rb:20:in `require'
  from /home/syed/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta4/lib/rails/commands.rb:20:in `<top (required)>'
  from script/rails:6:in `require'
  from script/rails:6:in `<main>'

由于我不再需要1.9.1来使用Rails 3,我使用以下命令卸载它:

rvm uninstall ruby-1.9.1

仍然是rails控制台崩溃。我做错了吗?

1 个答案:

答案 0 :(得分:1)

我正在使用Ubuntu 10.04和RVM来管理不同的ruby安装。

我必须这样做:

rvm包安装readline rvm删除1.9.2 rvm install 1.9.2 -C --with-readline-dir = / home / syed / .rvm / usr /

按照此处的说明操作: http://rvm.beginrescueend.com/packages/readline/并在...的帮助下 Sutto在#rvm irc.freenode.net