/ Homebrew

[Solved] libreadline.6.2.dylib (LoadError): when run 'rails console'

如下述錯誤訊息,在執行'rails c'後發生。我猜想是在更新homebrew等package management後導致。

/Users/hothero/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rb:9:in `require': dlopen(/Users/hothero/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/readline.bundle, 9): Library not loaded: /Users/hothero/.rvm/usr/lib/libreadline.6.2.dylib (LoadError) Referenced from: /Users/hothero/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/readline.bundle Reason: image not found - /Users/hothero/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/readline.bundle from /Users/hothero/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' from /Users/hothero/rails_projects/webCourseSite/readline/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `require' from /Users/hothero/rails_projects/webCourseSite/readline/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:3:in `<top (required)>' from /Users/hothero/rails_projects/webCourseSite/readline/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:38:in `require' from /Users/hothero/rails_projects/webCourseSite/readline/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:38:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>'
如紅色所示,是我認為發生問題的關鍵點。我嘗試用'brew link readline'來重設,但出現"Error: readline has multiple installed versions"。故:

brew uninstall readline --force

brew install readline

rvm repair