由于预编译资产失败,Git push heroku master失败

时间:2016-04-19 22:35:56

标签: ruby-on-rails git heroku github

在尝试将我的rails应用程序部署到Heroku时,我使用了

git push heroku master

它一直运行到最后。这是日志:

Counting objects: 107, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (97/97), done.
Writing objects: 100% (107/107), 33.17 KiB | 0 bytes/s, done.
Total 107 (delta 9), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using bundler 1.11.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/...........
remote:        Fetching version metadata from https://rubygems.org/...
remote:        Fetching dependency metadata from https://rubygems.org/..
remote:        Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote:        Installing rake 11.1.2
remote:        Installing i18n 0.7.0
remote:        Installing json 1.8.3 with native extensions
remote:        Installing minitest 5.8.4
remote:        Installing thread_safe 0.3.5
remote:        Installing builder 3.2.2
remote:        Installing erubis 2.7.0
remote:        Installing rack 1.5.5
remote:        Installing mime-types 1.25.1
remote:        Installing polyglot 0.3.5
remote:        Installing arel 5.0.1.20140414130214
remote:        Installing sass 3.2.19
remote:        Installing coffee-script-source 1.10.0
remote:        Installing execjs 2.6.0
remote:        Installing thor 0.19.1
remote:        Installing hike 1.2.3
remote:        Installing multi_json 1.11.2
remote:        Installing pg 0.18.4 with native extensions
remote:        Using bundler 1.11.2
remote:        Installing tilt 1.4.1
remote:        Installing rails_serve_static_assets 0.0.5
remote:        Installing rails_stdout_logging 0.0.5
remote:        Installing rdoc 4.2.2
remote:        Installing tzinfo 1.2.2
remote:        Installing rack-test 0.6.3
remote:        Installing treetop 1.4.15
remote:        Installing bootstrap-sass 3.0.3.0
remote:        Installing coffee-script 2.4.1
remote:        Installing uglifier 3.0.0
remote:        Installing sprockets 2.12.4
remote:        Installing rails_12factor 0.0.3
remote:        Installing sdoc 0.4.1
remote:        Installing activesupport 4.1.1
remote:        Installing mail 2.5.4
remote:        Installing actionview 4.1.1
remote:        Installing activemodel 4.1.1
remote:        Installing climate_control 0.0.3
remote:        Installing jbuilder 1.5.3
remote:        Installing actionpack 4.1.1
remote:        Installing activerecord 4.1.1
remote:        Installing cocaine 0.5.8
remote:        Installing actionmailer 4.1.1
remote:        Installing railties 4.1.1
remote:        Installing sprockets-rails 2.3.3
remote:        Installing paperclip 3.5.4
remote:        Installing coffee-rails 4.0.1
remote:        Installing jquery-rails 3.1.4
remote:        Installing rails 4.1.1
remote:        Installing sass-rails 4.0.5
remote:        Installing turbolinks 2.5.3
remote:        Bundle complete! 13 Gemfile dependencies, 50 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:        <= 1.8.6 : unsupported
remote:        = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:        = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (37.94s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:110:in `block (3 levels) in <class:Railtie>'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `each'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `block (2 levels) in <class:Railtie>'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:108:in `block in <class:Railtie>'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/config/environment.rb:5:in `<top (required)>'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
remote:        /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: !   Push rejected to sleepy-thicket-74065.
remote:
To https://git.heroku.com/sleepy-thicket-74065.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sleepy-thicket-74065.git'

请询问您是否还有其他想要查看的文件。我已经用这个问题检查了很多其他问题,但没有一个解决方案正在运行。

1 个答案:

答案 0 :(得分:0)

我的宝石文件搞砸了,我定义了错误的Ruby版本。