我正在尝试为本地计算机上的现有 Rails 项目启动服务器,但出现以下错误。谁能解释我为什么会收到此错误以及如何解决?
$ rails s
/Users/tomcaflisch/Sites/mysite/refinerycms/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
from /Users/tomcaflisch/Sites/mysite/refinerycms/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>'
from /Users/tomcaflisch/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
...
这里有一些可能相关的输出来帮助找出问题:
$ which ruby
/Users/tomcaflisch/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.3.0]