所以,当我推送到我以前没见过的heroku时,我遇到了一个错误。我正在积极尝试了解错误的含义,以便我可以解决它。
我看到我的sqlite3存在问题但仍无法解决问题。搞砸了我的宝石文件,然后花了几个小时让它回到当地工作,我来这里寻求帮助。
非常感谢任何输入!
Haydens-MacBook-Air:TicketFee_Calculator haydengoldman$ git push heroku master
Initializing repository, done.
Counting objects: 215, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (197/197), done.
Writing objects: 100% (215/215), 291.41 KiB | 244.00 KiB/s, done.
Total 215 (delta 66), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.3
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Using json 1.8.1
Installing minitest 5.4.2
Installing i18n 0.6.11
Installing rake 10.3.2
Installing builder 3.2.2
Installing erubis 2.7.0
Installing rack 1.5.2
Installing arel 5.0.1.20140414130214
Installing mime-types 2.4.1
Installing sass 3.2.19
Installing coffee-script-source 1.8.0
Installing thor 0.19.1
Installing hike 1.2.3
Installing multi_json 1.10.1
Using bundler 1.6.3
Installing tilt 1.4.1
Installing thread_safe 0.3.4
Installing rails_serve_static_assets 0.0.2
Installing rdoc 4.1.2
Installing rails_stdout_logging 0.0.3
Installing rack-test 0.6.2
Installing bootstrap-sass 3.1.1.0
Installing execjs 2.2.1
Installing mail 2.6.1
Installing tzinfo 1.2.2
Installing sprockets 2.11.0
Installing coffee-script 2.3.0
Installing rails_12factor 0.0.2
Installing sdoc 0.4.1
Installing uglifier 2.5.3
Installing activesupport 4.1.6
Installing activemodel 4.1.6
Installing jbuilder 2.2.2
Installing actionview 4.1.6
Installing actionpack 4.1.6
Installing railties 4.1.6
Installing actionmailer 4.1.6
Installing activerecord 4.1.6
Installing sprockets-rails 2.1.4
Installing coffee-rails 4.0.1
Installing jquery-rails 3.1.2
Installing sass-rails 4.0.3
Installing turbolinks 2.4.0
Installing rails 4.1.6
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Bundle completed (22.97s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/Rakefile:6)
rake aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/config/environment.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.1.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Gem::LoadError: sqlite3 is not part of the bundle. Add it to Gemfile.
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/bundler-1.6.3/lib/bundler/rubygems_integration.rb:252:in `block in replace_gem'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:188:in `spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/config/environment.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.1.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:ancient-castle-6465.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:ancient-castle-6465.git'
答案 0 :(得分:1)
Heroku使用postgresql数据库,因此从gem文件中删除 sqlite3 或将其移至开发组并添加 gem&#39; pg&#39; 到你的宝石文件。关于 database.yml 设置,请按照此Heroku setup
进行操作答案 1 :(得分:0)
确保已从Gemfile中删除sqlite3 gem并运行bundle install
。
如果你继续收到这个错误,请检查你的Gemfile.lock作为一些gems列出sqlite3作为依赖项 - 你也想要删除这些gems。