2
我努力嘗試讓MySQL啓動並運行我的第一個rails應用程序。 運行耙分貝時,我不斷收到以下錯誤:安裝RAILS_ENV =「生產」:mysql錯誤幫助...運行耙db:設置RAILS_ENV =「生產」
rake aborted!
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dyl Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2 /mysql2.bundle
/Users/chris/rails_projects/sienab/Rakefile:4
(See full trace by running task with --trace)
我的計算機運行雪豹時,MySQL 5.5,寶石mysql2,軌道3
任何幫助是巨大的。非常感謝。
的database.yml以下 #的SQLite 3.x版 #創業板安裝sqlite3的 發展: 適配器:sqlite3的 數據庫:DB/development.sqlite3 池:5 超時:5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: sienab_production
pool: 5
username: username
password: password
host: localhost
您是否曾嘗試在命令的開頭添加'bundle exec',以便在捆綁的gem環境中運行它? – Ant 2011-06-05 14:26:52
這是否有所作爲:'rake db:setup RAILS_ENV = production' – apneadiving 2011-06-05 14:55:50
否則,顯示您的'database.yml'文件 – apneadiving 2011-06-05 14:56:52