2012-05-07 41 views
0

安装了Rails 3.2.3和MySQL 5.6罚款我OSX 10.7.3Rails的服务器无法启动在OSX 10.73

我创建了一个名为“simple_cms”的新项目,然后,在终端,试图推出的WEBrick与“铁轨服务器”,什么都没有。

Hideyoshis-的MacBook-PRO:simple_CMS gregpfeffer $轨小号 /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle:dlopen的(/库/红宝石/宝石/ 1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle,9):未加载库:libmysqlclient.18.dylib(LoadError) 引用自:/Library/Ruby/Gems/1.8/gems/mysql2- 0.3.11/lib/mysql2/mysql2.bundle 原因:图像未找到 - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle from/Library/Ruby/Gems /1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9 from /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in require ' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66 :each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in要求从/Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in中请求' from /Library/Ruby/Gems/1.8/gems /bundler-1.1.3/lib/bundler.rb:119:in require' from /Users/gregpfeffer/Sites/simple_cms/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:53:in需要” 从/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:53 从/ Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:50:tap' from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:50 from script/rails:6:in需要' from script/rails:6 Hideyoshis-MacBook-Pro:simple_CMS gregpfeffer $ sudo install_name_tool - 更改libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle install_name_tool:can not打开文件:/Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/lib/mysql2/ mysql2.bundle(没有这样的文件或目录)

+0

你确定的MySQL在你的机器上运行? – natedavisolds

回答

2

尝试添加:

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/:$DYLD_LIBRARY_PATH 

要你的.bash_profile

这个假定您接受了默认的安装位置为MySQL