我是 Ror 新手,我正在尝试使用 rails 创建我的第一个 web 应用程序。我在安装 gem mysql2 时遇到了一个问题:这是我的实际配置:
ruby -v:ruby 1.9.3p194(2012-04-20 修订版 35410)[x86_64-linux]
导轨 -v:导轨 3.2.3
宝石-v:1.8.24
michele@michele:~/rails/my_app$ gem install mysql2
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.11
1 gem installed
Installing ri documentation for mysql2-0.3.11...
Installing RDoc documentation for mysql2-0.3.11...
在此之后,我编辑了 database.yml 并运行:
耙分贝:创建
它返回:
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)
所以,当我最终尝试安装它时,我得到了错误:
michele@michele:~/rails/my_app$ gem install activerecord-mysql2-adapter
ERROR: Could not find a valid gem 'activerecord-mysql2-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-jdbch2-adapter, activerecord-jdbcmysql-adapter, activerecord-postgis-adapter, activerecord-jdbc-adapter, activerecord-odbc-adapter
显然我正确安装了其他适配器,但它们不适合我对 mysql2 的需要。
没有别的,我只是堆在这里。:)