我是 Ruby on Rails 的新手,每次运行时都会遇到以下错误:
rails s
我收到以下错误:
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace
dyld: Symbol not found: _mysql_get_client_info
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace
Trace/BPT trap
我已经在 StackOverflow 和 good ol' Google 上对此进行了大量研究,并尝试了这篇文章中的解决方案:rails server error ? (rails 3)编辑 .profile 文件,并确保为 64 位系统安装了 mysql 和 ruby。
我在 OSX Snow Leopard 上运行,使用 Rails 3.0.9 和 Ruby 1.8.7。
任何帮助将不胜感激!!谢谢你! :)
最佳答案
要运行 Rails 3,您需要 ruby 1.9.2。在继续之前我会从那里开始,请检查这个链接,你最好的选择是使用 rvm 来管理你的 ruby 版本。问候
http://amerine.net/2010/02/24/rvm-rails3-ruby-1-9-2-setup.html
关于mysql - Ruby on Rails 和 MySQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6709708/