對不起,我是Ruby on Rails中的新成員,我正在學習一個教程,但我遇到了麻煩,試圖將數據庫推送到heroku。我已經在我的Linux中安裝了postgresql,嘗試了很多教程。Rails- Heroku - 耙子中止了!請安裝postgresql適配器:gem install activerecord-postgresql-adapter
當我進入heroku rake db:migrate
,我收到此錯誤信息:
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these >plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or >fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the >release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2- >has-been-released. (called from at /app/Rakefile:7) rake aborted! Please install the postgresql adapter:
gem install activerecord-postgresql-adapter
(pg is >not part of the bundle. Add it to Gemfile.)Tasks: TOP => db:migrate => db:load_config (See full trace by running task with --trace)
我的Gemfile是這樣的:
source 'https://rubygems.org'
gem 'rails', '3.2.2'
gem 'sqlite3'
group :production do
gem 'pg'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
我試着已經是這樣說:錯誤:無法找到有效的寶石的ActiveRecord-PostgreSQL的適配器「(> = 0)中的任何存儲庫 錯誤:可能的選擇:ActiveRecord的-jdbcpostgresql適配器,ActiveRecord的-PostGIS的適配器,activerecord-jdbcmssql-adapter,activerecord-jdbcmysql-adapter,activerecord-postgresql-cursors – Aklovo 2012-03-31 03:36:04
我更新了我的答案。我把解決方案放在線下。 – 2012-03-31 12:56:14
這個解決方案在這裏看起來不錯,如果你仍然有這個問題,你可以用你的「gem list」輸出和你的Gemfile.lock來更新它嗎?還要確保你已經使用了bundle安裝。 – YogiZoli 2012-04-03 00:39:18