1

我正在开发一个使用 rails 3.2.1 的 rails 应用程序。我为它创建了一个单独的 gem 集并安装了 gem。到目前为止,一切正常,但是当我进入 rails 控制台时,我收到以下错误:

/home/santosh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rbin require': no such file to load -- readline (LoadError)
from /home/santosh/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rb:9:in'
from /home/santosh/.rvm/gems/ruby-1.9.2-p290@sample/gems/railties-3.2.1/lib/rails/commands/console.rbin require'
from /home/santosh/.rvm/gems/ruby-1.9.2-p290@sample/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in'
from /home/santosh/.rvm/gems/ruby-1.9.2-p290@sample/gems/railties-3.2.1/lib/rails/commands.rb:38:in require'
from /home/santosh/.rvm/gems/ruby-1.9.2-p290@sample/gems/railties-3.2.1/lib/rails/commands.rb:38:in'
from script/railsin require'
from script/rails:6:in'

通过谷歌浏览并尝试安装 readline 但没有用。那我在哪里做错了?

4

1 回答 1

0

由于使用 rvm 安装 ruby​​,我遇到了类似的问题。

为了解决这个问题,我卸载了我的 ruby​​ 版本,并使用以下命令对其进行了安装:

rvm install 1.9.2 --with-readline-dir=$rvm_path/.rvm/usr

我希望它有帮助

于 2012-04-20T11:52:45.297 回答