我使用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