私は mysql を使用する Rails プロジェクトを持っています (過去に成功しました)。ただし、postgres インストールをアップグレードした後、この Rails プロジェクトはアダプターがインストールされていないというエラーをスローしています。
/Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError)
私のdatabase.yml
ファイルは、アダプタを として正しく宣言していmysql2
ます。
推奨どおりにactiverecord-postgresql-adapter gemをインストールしようとしましたが(postgresを使用していないため、gemfileに追加しませんでした)、問題は解決しませんでした。
マシンの mysql サーバーにログインして、データベースとそのテーブルが存在することを確認できます。
スタック トレースは、Rails が postgres アダプターを使用しようとしていることを示していますが、プロジェクト内のどこで postgres を使用するように指示していません。
from /Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@mfacs/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `<top (required)>'
from /Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@mfacs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@mfacs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@mfacs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stuartnelson/.rvm/gems/ruby-1.9.3-p448@mfacs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
どういうわけか、私のpostgreインストールでモンキーがこれを引き起こしました(私は思う)。誰もこれについて経験があり、それを修正する方法はありますか?