简体   繁体   中英

sequel adapter is missing by deploying a database to heroku

I'm trying to deploy my app on heroku. But everytime I try to push my database, I get the following error:

heroku db:push
Sending schema
Schema:        100% |==========================================| Time: 00:00:16
Sending indexes
refinery_page: 100% |==========================================| Time: 00:00:02
refinery_page: 100% |==========================================| Time: 00:00:01
refinery_page: 100% |==========================================| Time: 00:00:01
refinery_page: 100% |==========================================| Time: 00:00:04
refinery_role: 100% |==========================================| Time: 00:00:01
refinery_user: 100% |==========================================| Time: 00:00:01
refinery_user: 100% |==========================================| Time: 00:00:00
seo_meta:      100% |==========================================| Time: 00:00:01
schema_migrat: 100% |==========================================| Time: 00:00:00
Sending data
14 tables, 49 records
refinery_arti:   0% |     
Saving session to push_201305220223.dat..
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: LoadError: no such file to load -- sequel/adapters/
["/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in `require'", 
...

I use Rails 3.2.13, Ruby 1.9.3, refinerycms and mysql lite. I also tried to install missing gems ... Is this a fault of heroku? Or am I just stupid? :-)

my gem file:

source 'https://rubygems.org'

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails', '~> 2.0.0'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

# Refinery CMS
gem 'refinerycms', '~> 2.0.0', :git => 'git://github.com/refinery/refinerycms.git', :branch => '2-0-stable'

# Specify additional Refinery CMS Extensions here (all optional):
gem 'refinerycms-i18n', '~> 2.0.0'
#  gem 'refinerycms-blog', '~> 2.0.0'
#  gem 'refinerycms-inquiries', '~> 2.0.0'
#  gem 'refinerycms-search', '~> 2.0.0'
#  gem 'refinerycms-page-images', '~> 2.0.0'

gem 'refinerycms-articles', :path => 'vendor/extensions'

database.yml:

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

You have to use postgres on Heroku, do the following in your Gemfile:

group :production do
  gem 'pg'
end

group :test, :development do
  gem 'sqlite3'
end

Then commit the changes and push again.

In your database.yml file connection to PostgreSQL database is as

production:
  adapter:PostgreSQL 
  database: production
  pool: 5
  timeout: 5000

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM