【发布时间】:2014-10-22 15:57:24
【问题描述】:
我使用 Homebrew (brew install mysql) 安装了 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 所述,但没有奏效。
我尝试了here 中描述的 sudo 命令,但没有成功。
然后我尝试将我的 Ruby 版本从 2.1.1.. 更新到 2.1.2..,现在当我运行 rake:db migrate 时出现此错误
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! 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时出现此错误 -
最后一行有一条线索:“command not found The 'bundle' command exists in these Ruby versions: 2.1.1”。试试
gem install bundler(升级 ruby 后需要)。 -
那行得通。谢谢@paulwise!感谢所有做出贡献的人。
标签: mysql ruby-on-rails macos command-line