我是Ruby on Rails的新手,我正在使用RVM來管理Ruby版本。爲什麼Rails控制檯說「無法加載這樣的文件 - readline」?
我的筆記本電腦安裝了Ruby1.8.7,但我的項目使用RVM,Ruby1.9.3和Rails 3.2.11。
我不能沒有它給我下面的錯誤運行rails c
或rails console
:
/home/phil/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
from /home/phil/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands/console.rb:3:in `require'
from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:38:in `require'
from /home/phil/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.11/lib/rails/commands.rb:38:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
哪個'rails'命令在運行? '哪個rails'的輸出是什麼? –
感謝Stuart的回覆。我在下面回答。 – polarcare