`
JasonChi
  • 浏览: 94815 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

mac rails3.1 启动mysql报错解决

 
阅读更多
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle
  Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle
	from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2.rb:9
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `require'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
	from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
	from /Users/chijason/mytest/config/application.rb:7
	from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:52:in `require'
	from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:52
	from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap'
	from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/commands.rb:49
	from script/rails:6:in `require'
	from script/rails:6



sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle

sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib /Users/chijason/.rvm/gems/ruby-1.9.3-p125@mztop/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle

~/.bash_profile or ~/.profile
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

参考出处:
http://www.alishabdar.com/2011/03/22/running-mysql-5-5-and-rails-3-on-mac-os-x/
http://getmetorajesh.com/ror/2011/09/18/installing-radiant-cms/
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics