rake aborted!
cannot load such file -- sqlite3
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `block in require'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:597:in `new_constants_in'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:225:in `load_dependency'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/core_ext/kernel/requires.rb:9:in `block in require_library_or_gem'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/core_ext/kernel/reporting.rb:11:in `block in silence_warnings'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/core_ext/kernel/reporting.rb:22:in `with_warnings'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activesupport-3.0.12/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/sqlite3_adapter.rb:24:in `sqlite3_connection'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `new_connection'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `checkout_new_connection'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:191:in `block (2 levels) in checkout'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `loop'
/var/www/BookBuilder/releases/20140317160018/vendor/cache/ruby/1.9.1/gems/activerecord-3.0.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `block in checkout'
我在登台服务器上运行rake任务,该服务器使用postgresql作为数据库,出于某种原因,我收到sqlite3的错误,该错误仅用于开发。请提供一些有关此问题的见解
数据库:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test: &test
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
staging:
encoding: unicode
adapter: postgresql
username: postgres
port: 5432
host: localhost
database: staging
password: password
的Gemfile:
gem 'rails', '3.0.12'
gem 'rake', '0.8.7'
gem 'newrelic_rpm'
gem 'airbrake'
gem 'paperclip'
gem 'paperclip-meta'
gem 'spree', '0.60.6'
gem 'simple_xlsx_writer'
gem 'rubyzip', "~> 0.9.9"
gem 'resque', :require => 'resque/server'
gem 'pdfkit', '0.5.2'
gem 'imgkit', '1.3.7'
gem 'pony'
group :development, :test do
gem 'sqlite3'
end
group :staging do
gem 'pg'
end
group :production do
gem 'mysql'
end
gem 'net-ssh', '2.7.0'
gem 'capistrano'
gem 'will_paginate_renderers', '0.0.3'
gem "httparty", "~> 0.7.8"
gem "spree_theme", :path => "spree_theme", :require => "spree_theme"
gem "spree_customizations", :path => "spree_customizations", :require => "spree_customizations"
gem "yell-rails", "1.4.0"
gem "yell-adapters-gelf"
答案 0 :(得分:0)
我个人会尝试这个:
bundle install --without production
rake task_name RAILS_ENV=staging