我已经重新安装了Ruby版本,但我无法找到原因,当我转到终端并输入rails c
时,它会抛出此错误:
.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
from /Users/cleytonmessias/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/completion.rb:9:in `<top (required)>'
from /Users/cleytonmessias/.rvm/gems/ruby-2.0.0-p247@trustvox/gems/railties-4.0.3/lib/rails/commands/console.rb:3:in `require'
from /Users/cleytonmessias/.rvm/gems/ruby-2.0.0-p247@trustvox/gems/railties-4.0.3/lib/rails/commands/console.rb:3:in `<top (required)>'
from /Users/cleytonmessias/.rvm/gems/ruby-2.0.0-p247@trustvox/gems/railties-4.0.3/lib/rails/commands.rb:51:in `require'
from /Users/cleytonmessias/.rvm/gems/ruby-2.0.0-p247@trustvox/gems/railties-4.0.3/lib/rails/commands.rb:51:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我使用的是Mac OSX Mavericks,Ruby-2.0.0-p247和Rails 4。
答案 0 :(得分:0)
我终于找到了一个帮助我的参考资料。
使用此link:
~/.rvm/user/db
并添加了以下行:ruby_configure_flags=--with-readline-dir=/usr/local/opt/readline
现在,当我输入rails c
时,它再次工作:)