2011-04-07 106 views
1

當我試圖軌道服務器我:第一軌道配置,無法啓動使用Rails服務器

/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.11/lib/bundler/runtime.rb:68:in `require' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler/runtime.rb:68:in `require' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `each' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler/runtime.rb:66:in `require' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `each' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler/runtime.rb:55:in `require' 
    from /Library/Ruby/Gems/1.8/gems/bundler-1.0.11/lib/bundler.rb:120:in `require' 
    from /Users/inathan/sites/simple_cms/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 

我想我遵循的步驟逐字,但現在我很爲難。在此先感謝...

回答

0

您需要從MySQL官方網站安裝MySQL,確保它已啓動,然後安裝適當的MySQL gem(mysql for rails 2.x和mysql2 for rails 3.x)