【问题标题】:MySQL bindings for Rails 2.3.5 on Mac OS X 10.5.8Mac OS X 10.5.8 上 Rails 2.3.5 的 MySQL 绑定
【发布时间】:2011-01-27 13:57:52
【问题描述】:

我有一个使用 macports 设置的 rails 环境。我最近更新了 macports,它似乎有断轨的副作用。当我尝试启动 Rails 服务器时,我得到:

$ ./script/server => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. /opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin9/mysql.bundle: dlopen(/opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin9/mysql.bundle, 9): Library not loaded: /opt/local/lib/mysql5/mysql/libmysqlclient.15.dylib (LoadError) Referenced from: /opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin9/mysql.bundle Reason: image not found - /opt/local/lib/ruby/vendor_ruby/1.8/i686-darwin9/mysql.bundle

我已经尝试使用我在网上找到的各种配置多次重新安装 mysql gem,但似乎没有任何帮助。另外,当我尝试使用 rake 时,我得到:

rake db:migrate Rails requires RubyGems >= 1.3.1 (you have 1.0.1). Pleasegem 更新 --systemand try again.

即使:

gem --version 1.3.6

这是怎么回事?

【问题讨论】:

    标签: mysql ruby-on-rails macos macports gem


    【解决方案1】:

    似乎问题在于我在 macports 下安装了 rails,并且还作为 gem。我从 macports 中卸载了所有 rails 组件,只使用 gems 版本,它似乎已经解决了 MySQL 问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-23
      • 2012-05-21
      • 2010-12-08
      • 2011-01-27
      • 2010-11-29
      • 2012-02-04
      • 2010-12-25
      • 2010-09-14
      相关资源
      最近更新 更多