2016-04-08 41 views
0

这是我试图推上heroku的应用程序:https://github.com/kunokdev/flightmap但是我得到Precompiling assets failed错误和Push rejected to ...日志。什么可能导致这个?部署heroku应用程序时,我得到推拒绝错误(预编译资产失败)

remote:  /tmp/build_b9c70fb95f66f6b57f7d5868507a42de/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.4/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define' 
remote:  Tasks: TOP => assets:precompile 
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 flightmap. 
remote: 
To ssh://[email protected]/flightmap.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'ssh://[email protected]/flightmap.git' 
[email protected]:~/dev/flightmap$ 

这是我的Gemfile:

source 'https://rubygems.org' 


gem 'rails', '4.2.2' 
# Use SCSS for stylesheets 
gem 'sass-rails', '~> 5.0' 
# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 
# Use jquery as the JavaScript library 
gem 'jquery-rails' 
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 2.0' 
# bundle exec rake doc:rails generates the API under doc/api. 
gem 'sdoc', '~> 0.4.0', group: :doc 
# rake 
gem 'rake', '11.1.2' 
# csv reader 
gem 'smarter_csv' 
# bower rails 
gem 'bower-rails' 
# angular templates 
gem 'angular-rails-templates' 
# angular material 
gem 'rails-angular-material' 
# ionicons 
gem 'ionicons-rails' 
# Get user location info 
gem 'geocoder' 

group :development, :test do 
    # Call 'byebug' anywhere in the code to stop execution and get a debugger console 
    gem 'byebug' 
    # Use sqlite3 as the database for Active Record 
    gem 'sqlite3' 
end 

    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 
    gem 'spring' 

group :development do 
    # Access an IRB console on exception pages or by using <%= console %> in views 
    gem 'web-console', '~> 2.0' 
end 

group :test do 
    gem 'minitest-reporters', '1.0.5' 
    gem 'mini_backtrace',  '0.1.3' 
    gem 'guard-minitest',  '2.3.1' 
end 

group :production do 
    gem 'pg' 
    gem 'rails_12factor' 
end 

ruby "2.2.1" 
+0

请参阅https://devcenter.heroku.com/articles/rails-4-asset-pipeline;特别是调试部分。 –

+0

我发现这个[SO帖子](http://stackoverflow.com/questions/7986139/git-error-when-trying-to-push-pre-receive-hook-declined)可能是相关的。 –

+1

试试这个'RAILS_ENV =生产捆绑包exec rake资产:预编译' – 7urkm3n

回答

0

正如@ 7urkm3n建议终端命令RAILS_ENV=production bundle exec rake assets:precompile解决了这个问题。

相关问题