我使用Homebrew安裝MySQL(brew install mysql
),然後運行$ gem install mysql2
。我在運行OSX 10.9.4的Mac上。不能耙:數據庫遷移 - 繼續獲取'耙子中止!加載錯誤'
我改變目錄到我的應用程序的根目錄,然後嘗試運行rake db:migrate
命令,得到這個錯誤:
Levine_iMac$ rake db:migrate
rake aborted!
LoadError: dlopen(/Users/Levine_iMac/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method
Referenced from: /Users/Levine_iMac/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
in /Users/Levine_iMac/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle - /Users/Levine_iMac/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
/Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/config/application.rb:3:in require'
/Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/config/application.rb:3:in <top (required)>'
/Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/Rakefile:4:in <top (required)>'
(See full trace by running task with --trace)
Levine_iMac$
我嘗試添加點東西給我的.bash_profile,如描述here,但那沒用。
我嘗試了一個sudo命令,如here所述,但這並不奏效。
然後我試圖從2.1.1更新我的Ruby版本.. 2.1.2 ..,當我運行rake現在我收到此錯誤:DB上遷移
Levine_iMac$ rake db:migrate rake aborted! cannot load such file -- bundler/setup /Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/config/boot.rb:4:in '<top (required)>' /Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/config/application.rb:1:in '<top (required)>' /Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/Rakefile:4:in '<top (required)>' (See full trace by running task with --trace) Levine_iMac$ bundle install rbenv: bundle: command not found The 'bundle' command exists in these Ruby versions: 2.1.1 Levine_iMac$
任何想法如何補救這個?謝謝。
我試過了。現在我運行rake時出現這個錯誤:db migrate 'Levine_iMac $ rake db:migrate rake aborted! 無法加載此文件 - 打包程序/設置 /Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/config/boot.rb:4:in'' /Users/Levine_iMac/Dropbox/Coding /Sandbox/simple_cms2/config/application.rb:1:in'' /Users/Levine_iMac/Dropbox/Coding/Sandbox/simple_cms2/Rakefile:4:in'' (通過運行帶有--trace任務查看完整的跟蹤) Levine_iMac $捆綁安裝 rbenv:包:找不到命令 的「捆綁」命令在這些Ruby版本存在: 2.1.1' –
HPJAJ
2014-08-28 18:01:08
有一個線索在最後line:「找不到命令'bundle'命令存在於這些Ruby版本中:2.1.1」。試試'gem install bundler'(升級紅寶石後需要)。 – cydparser 2014-08-28 20:09:28
工作。謝謝@paulwise!感謝所有貢獻的人。 – HPJAJ 2014-08-28 20:42:11