ruby-on-rails – Ruby On Rails 3和Webrick问题

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Ruby On Rails 3和Webrick问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
谢谢你看看这个.

我通过lynda.com开始了关于RoR的初学者教程.我按照说明写信.到目前为止,一切都在工作,直到我访问Webrick.当我输入“rails server”开始工作时,我收到以下错误消息.

/Library/Ruby/Gems/1.8/gems/MysqL2-0.2.7/lib/MysqL2/MysqL2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/MysqL2-0.2.7/lib/MysqL2/MysqL2.bundle,9): Library not loaded: libMysqLclient.18.dylib (LoadError)
  Referenced from: /Library/Ruby/Gems/1.8/gems/MysqL2-0.2.7/lib/MysqL2/MysqL2.bundle
  Reason: image not found - /Library/Ruby/Gems/1.8/gems/MysqL2-0.2.7/lib/MysqL2/MysqL2.bundle

from /Library/Ruby/Gems/1.8/gems/MysqL2-0.2.7/lib/MysqL2.rb:8
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler.rb:120:in `require'
from /Users/macuser/Sites/simplecms/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:28:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:27:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6

我正在使用

> iMac
> Ruby 1.87
>宝石1.7.2

由于我没有经历任何Ruby,我迷失了如何解决这个问题.

如果可能,请提前感谢您的关注和帮助.

解决方法

在终端运行这些:
gem install bundler
bundle

然后你应该能够启动服务器.

编辑:您应该真正考虑使用rvm来管理您的ruby安装和gemsets.它还可以节省您安装它们的大量时间和精力.

原文链接:https://www.f2er.com/ruby/274189.html

猜你在找的Ruby相关文章