我试图预编译我的应用程序的资产以部署到Heroku,但必须遵循以下错误。Rails Rake资产:用于生产的预编译
当运行:
RAILS_ENV=production bundle exec rake assets:precompile
错误:
/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
因为我在发展SQLite和生产PostgreSQL的以下的Gemfile
gem "rails", "~> 3.1.0"
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end
gem 'sass-rails', "~> 3.1.0"
group :assets do
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
gem 'compass', '~> 0.12.alpha.0'
gem 'html5-boilerplate'
end
使用我尝试了很多,但可以”吨得到这个工作。
我不知道这是重要的,但我的database.yml的样子:
production:
adapter: postgresql
host: localhost
database: db
encoding: unicode
username: user
password: ''
你尝试过这个在雪松堆栈? 'heroku创建 - 堆雪松' – daniel