Pushing this rails 4 app to heroku. Any help is appreciated. App is copied straight from Lynda.com Ruby on Rails 4 Essential Training Exercise files zip. I read other posts and removed the gemfile.lock then ran bundle install but it didn't many any difference. There shouldn't be a problem? Thanks anyway
ggeorgiev#ubuntu:~/projects/simple_cms_4$ git push heroku master
Initializing repository, done.
Counting objects: 173, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (161/161), done.
Writing objects: 100% (173/173), 47.04 KiB, done.
Total 173 (delta 31), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.5.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Using rake (10.1.0)
Using minitest (4.7.5)
Using tzinfo (0.3.37)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Installing multi_json (1.7.7)
Using polyglot (0.3.3)
Using activerecord-deprecated_finders (1.0.3)
Installing mime-types (1.23)
Using bcrypt-ruby (3.0.1)
Using hike (1.2.3)
Using json (1.8.0)
Installing arel (4.0.0)
Using bundler (1.5.2)
Using thor (0.18.1)
Using tilt (1.4.1)
Using rack-test (0.6.2)
Installing treetop (1.4.14)
Using rdoc (3.12.2)
Using sprockets (2.10.0)
Using mail (2.5.4)
Using sdoc (0.3.20)
Installing i18n (0.6.4)
Installing atomic (1.1.10)
Installing thread_safe (0.1.2)
Installing activesupport (4.0.0)
Installing activemodel (4.0.0)
Installing actionpack (4.0.0)
Installing activerecord (4.0.0)
Installing actionmailer (4.0.0)
Installing railties (4.0.0)
Installing sprockets-rails (2.0.0)
Installing acts_as_list (0.3.0)
Installing rails (4.0.0)
Installing mysql2 (0.3.13)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (17.99s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
I, [2014-01-22T13:17:44.812043 #1278] INFO -- : Writing /tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/public/assets/footer_gradient-4f04310658a469a35a8014a13e9e1fff.png
I, [2014-01-22T13:17:44.816570 #1278] INFO -- : Writing /tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/public/assets/plus_sign-d0a969825c4cf5d10c388d8449c717c0.png
rake aborted!
couldn't find file 'jquery'
(in /tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/app/assets/javascripts/application.js:13)
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:106:in `resolve'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:146:in `require_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:217:in `process_require_directive'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:165:in `each'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:165:in `process_directives'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:99:in `evaluate'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `each'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:12:in `initialize'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `block in build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `new'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_8a07d45d-d10f-448a-9d51-c50b5e9fdd7c/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:intense-tor-3783.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:intense-tor-3783.git'
ggeorgiev#ubuntu:~/projects/simple_cms_4$
It's trying to compile your assets without access to jQuery. You need to uncomment/add gem 'jquery-rails' to your Gemfile. If you haven't already, Heroku also recommends adding gem 'rails_12factor'.
Related
I have added the aws access info in /config/initializers/carrier_wave.rb:
if Rails.env.production?
CarrierWave.configure do |config|
config.fog_credentials = {
# Configuration for Amazon S3
:provider => 'AWS',
:aws_access_key_id => ENV['access_key'],
:aws_secret_access_key => ENV['secret_access_key'],
}
config.fog_directory = ENV['bucket']
end
end
but when i try to push to heroku, i get the following error: i am not sure what else to do, any help would be greatly appreciated.
JUSTINs-iMac:premidx justindoshay$ git push heroku
Fetching repository, done.
Counting objects: 23, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (12/12), 1.09 KiB | 0 bytes/s, done.
Total 12 (delta 9), reused 0 (delta 0)
-----> Removing .DS_Store files
-----> 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
Using rake 10.3.2
Using minitest 5.4.2
Using thread_safe 0.3.4
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.1
Using rack 1.6.0.beta
Using i18n 0.7.0.beta1
Using mime-types 2.4.3
Using arel 6.0.0.beta2
Using bcrypt 3.1.7
Using sass 3.4.7
Using json 1.8.1
Using will_paginate 3.0.7
Using thor 0.19.1
Using cancan 1.6.10
Using uber 0.0.10
Using execjs 2.2.2
Using formatador 0.2.5
Using coffee-script-source 1.8.0
Using excon 0.41.0
Using net-ssh 2.9.1
Using inflecto 0.0.2
Using multi_json 1.10.1
Using ipaddress 0.8.0
Using gritter 1.1.0
Using hike 1.2.3
Using kgio 2.9.2
Using pg 0.17.1
Using bundler 1.6.3
Using subexec 0.2.3
Using rails_serve_static_assets 0.0.2
Using tilt 1.4.1
Using raindrops 0.13.0
Using rails_stdout_logging 0.0.3
Using tzinfo 1.2.2
Using nokogiri 1.6.4
Using rack-test 0.6.2
Using rdoc 4.1.2
Using mail 2.6.3
Using bootstrap-will_paginate 0.0.10
Using bootstrap-sass 3.2.0.0
Using uglifier 2.5.3
Using faker 1.4.2
Using coffee-script 2.3.0
Using net-scp 1.2.1
Using fog-json 1.0.0
Using mini_magick 3.8.0
Using unicorn 4.8.3
Using activesupport 4.2.0.beta4
Using sprockets 2.12.3
Using rails_12factor 0.0.2
Using sdoc 0.4.0
Using fog-core 1.24.0
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.0
Using loofah 2.0.1
Using jbuilder 2.2.3
Using activemodel 4.2.0.beta4
Using fog-brightbox 0.6.1
Using fog-softlayer 0.3.23
Using rails-dom-testing 1.0.4
Using activejob 4.2.0.beta4
Using rails-html-sanitizer 1.0.1
Using activerecord 4.2.0.beta4
Using carrierwave 0.10.0
Using actionview 4.2.0.beta4
Using fog 1.23.0
Using friendly_id 5.0.4
Using actionpack 4.2.0.beta4
Using actionmailer 4.2.0.beta4
Using sprockets-rails 3.0.0.beta1
Using simple_form 3.0.2
Using railties 4.2.0.beta4
Using coffee-rails 4.0.1
Using cells 3.11.2
Using jquery-rails 4.0.0.beta2
Using rails 4.2.0.beta4
Using sass-rails 5.0.0.beta1
Using turbolinks 2.3.0
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (0.79s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
ArgumentError: Missing required arguments: aws_access_key_id, aws_secret_access_key
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/fog-core-1.24.0/lib/fog/core/service.rb:237:in `validate_options'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/fog-core-1.24.0/lib/fog/core/service.rb:261:in `handle_settings'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/fog-core-1.24.0/lib/fog/core/service.rb:98:in `new'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/fog-core-1.24.0/lib/fog/storage.rb:26:in `new'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:83:in `eager_load_fog'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:96:in `fog_credentials='
/tmp/build_147081514681b2a6351adf453926ef97/config/initializers/carrier_wave.rb:3:in `block in <top (required)>'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:118:in `configure'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:14:in `configure'
/tmp/build_147081514681b2a6351adf453926ef97/config/initializers/carrier_wave.rb:2:in `<top (required)>'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `block in load'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/engine.rb:648:in `block in load_config_initializer'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/engine.rb:647:in `load_config_initializer'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/engine.rb:611:in `each'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/engine.rb:611:in `block in <class:Engine>'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:30:in `run'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:44:in `each'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/application.rb:349:in `initialize!'
/tmp/build_147081514681b2a6351adf453926ef97/config/environment.rb:5:in `<top (required)>'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/application.rb:325:in `require_environment!'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0.beta4/lib/rails/application.rb:438:in `block in run_tasks_blocks'
/tmp/build_147081514681b2a6351adf453926ef97/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.0.beta1/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:damp-coast-2948.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:damp-coast-2948.git'
Make certain that your environment variables are set
You can do this by running
heroku config
in your terminal.
This command will output your current environment variables, if you do not see ACCESS_KEY or
SECRET_ACCESS_KEY then run the following command in terminal
heroku config:set ACCESS_KEY=YOUR_ACCESS_KEY_HERE
heroku config:set SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY_HERE
You must set the config vars. Go to your app on Heroku, click Settings and Reveal Config Vars.
Heroku Docs
When using git to push to heroku the rake fails on precompile.
I am using ruby 2.0.0
I am using gem 'pg'
I am using fem 'rails_12factor'
Here is the gitHub of the files: https://github.com/ioniz4tion/sample_app/tree/master
Here is the full reoprt :
$ git push heroku master
Fetching repository, done.
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 697 bytes, done.
Total 8 (delta 6), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at
all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle -
-binstubs vendor/bundle/bin -j4
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.0
Using thread_safe 0.3.4
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using bundler 1.6.3
Using coffee-script-source 1.7.1
Using execjs 2.2.1
Using thor 0.19.1
Using hike 1.2.3
Using multi_json 1.10.1
Using pg 0.17.1
Using tilt 1.4.1
Using rails_serve_static_assets 0.0.2
Using rails_stdout_logging 0.0.3
Using sass 3.2.19
Using rdoc 4.1.1
Using tzinfo 1.2.2
Using treetop 1.4.15
Using rack-test 0.6.2
Using coffee-script 2.3.0
Using uglifier 2.5.3
Using sprockets 2.11.0
Using rails_12factor 0.0.2
Using sdoc 0.4.1
Using activesupport 4.1.5
Using mail 2.5.4
Using actionview 4.1.5
Using activemodel 4.1.5
Using jbuilder 2.1.3
Using actionpack 4.1.5
Using activerecord 4.1.5
Using actionmailer 4.1.5
Using railties 4.1.5
Using sprockets-rails 2.1.3
Using coffee-rails 4.0.1
Using jquery-rails 3.1.1
Using sass-rails 4.0.3
Using turbolinks 2.3.0
Using rails 4.1.5
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (4.71s)
Cleaning up the bundler cache.
Removing rspec-expectations (3.0.4)
Removing rspec-rails (3.0.2)
Removing rspec-mocks (3.0.4)
Removing diff-lcs (1.2.5)
Removing rspec-support (3.0.4)
Removing rspec-core (3.0.4)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NoMethodError: undefined method `group' for #<SampleApp::Application:0x007f530db1e7e0>
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/config/environments/production.rb:46:in `block in <top (required)>'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `instance_eval'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/railtie.rb:210:in `configure'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/config/environments/production.rb:1:in `<top (required)>'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:593:in `each'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/engine.rb:593:in `block in <class:Engine>'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:30:in `run'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:44:in `each'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:300:in `initialize!'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/config/environment.rb:5:in `<top (required)>'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/railties-4.1.5/lib/rails/application.rb:379:in `block in run_tasks_blocks'
/tmp/build_65e0ceb6-3d44-46ce-9a02-d5dd81ca5d69/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:55: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:pure-sea-9201.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:pure-sea-9201.git'
The error is in your production.rb
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
ruby '2.0.0'
This stuff belongs in the Gemfile, not production.rb
I'm a bit too new at RoR to spot where the error is. Been following railstutorial.org and I get this on my push to heroku.
Is it aborting because of this --> NoMethodError: undefined method `link_to' for .
??
That's the only thing that I was able to spot for myself.
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Fetching repository, done.
Counting objects: 88, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (56/56), done.
Writing objects: 100% (62/62), 23.47 KiB | 0 bytes/s, done.
Total 62 (delta 25), reused 0 (delta 0)
-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Using rake (10.2.2)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.9.2)
Using atomic (1.1.16)
Using tzinfo (0.3.39)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using mime-types (1.25.1)
Using activerecord-deprecated_finders (1.0.3)
Using polyglot (0.3.4)
Using arel (4.0.2)
Using sass (3.3.4)
Using coffee-script-source (1.7.0)
Using execjs (2.0.2)
Using thor (0.19.1)
Using hike (1.2.3)
Using json (1.8.1)
Using pg (0.15.1)
Using bundler (1.5.2)
Using tilt (1.4.1)
Using rails_serve_static_assets (0.0.2)
Using rails_stdout_logging (0.0.3)
Using thread_safe (0.3.1)
Using treetop (1.4.15)
Using uglifier (2.1.1)
Using rdoc (3.12.2)
Using rails_12factor (0.0.2)
Using activesupport (4.0.4)
Using mail (2.5.4)
Using sdoc (0.3.20)
Using activemodel (4.0.4)
Using jbuilder (1.0.2)
Using rack-test (0.6.2)
Using activerecord (4.0.4)
Using actionpack (4.0.4)
Using actionmailer (4.0.4)
Using railties (4.0.4)
Using jquery-rails (3.0.4)
Using coffee-script (2.2.0)
Using coffee-rails (4.0.1)
Using turbolinks (1.1.1)
Installing sprockets (2.11.0)
Using sprockets-rails (2.0.1)
Using rails (4.0.4)
Using sass-rails (4.0.1)
Installing bootstrap-sass (2.3.2.0)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (8.36s)
Cleaning up the bundler cache.
Removing sprockets (2.12.0)
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
I, [2014-05-08T09:29:54.385001 #707] INFO -- : Writing /tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/public/assets/rails-9526610ae44d9e73134fd4337d78a4bb.png
I, [2014-05-08T09:29:59.414656 #707] INFO -- : Writing /tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/public/assets/application-354cc53e50f2562d96d57a34facbc739.js
rake aborted!
NoMethodError: undefined method `link_to' for #<#<Class:0x007f34511a3ad8>:0x007f34503d11f8>
(in /tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb)
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb:8:in `block in singleton class'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb:-5:in `instance_eval'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb:-5:in `singleton class'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb:-7:in `__tilt_69931320843940'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:12:in `initialize'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:vast-brushlands-3575.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:vast-brushlands-3575.git'
Here's the error for your perusal:
NoMethodError: undefined method `link_to' for #<#<Class:0x007f34511a3ad8>:0x007f34503d11f8>
(in /tmp/build_9f6acb94-a718-4de8-8d46-b7b035805102/app/assets/stylesheets/_footer.html.erb)
As #Merek has pointed out, you've got a _footer.html.erb file in your assets/stylesheets folder. As rake assets:precompile basically takes your CSS & turns it into precompiled code, it's saying it can't process link_to
Remove the file, recommit and re-push to Heroku. It should work, unless you've got other rouge files
Please Update Your WebPacker and Yarn with this command:
yarn upgrade #rails/webpacker --latest
`
I am unable to deploy Ruby on Rails application to heroku, I am getting Precompiling assets failed !. Its working fine in my localhost. I can't figure out what causing this issue. Also added config.assets.initialize_on_precompile = false in application.rb, but no helps. :(
Here is the log
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Using minitest (4.7.5)
Using atomic (1.1.14)
Using tzinfo (0.3.38)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Installing multi_json (1.8.4)
Using polyglot (0.3.3)
Using activerecord-deprecated_finders (1.0.3)
Installing mime-types (1.25.1)
Installing i18n (0.6.9)
Using bcrypt-ruby (3.1.2)
Using sass (3.2.10)
Using thor (0.18.1)
Installing rake (10.1.1)
Installing ambry (0.3.1)
Installing highline (1.6.19)
Installing arel (4.0.2)
Installing fssm (0.2.10)
Installing net-ssh (2.7.0)
Installing dalli (2.6.4)
Using execjs (2.0.1)
Installing orm_adapter (0.4.0)
Using bundler (1.5.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Installing chunky_png (1.2.9)
Installing differ (0.1.2)
Installing httpauth (0.2.0)
Installing multipart-post (1.2.0)
Installing hashie (2.0.5)
Installing redis (3.0.4)
Installing oauth (0.4.7)
Installing rack-google-analytics (0.12.0)
Using rails_serve_static_assets (0.0.1)
Using rails_stdout_logging (0.0.3)
Installing newrelic_rpm (3.6.7.152)
Installing ref (1.0.5)
Using thread_safe (0.1.3)
Using rack-test (0.6.2)
Installing warden (1.2.3)
Installing jwt (0.1.8)
Using treetop (1.4.15)
Installing libv8 (3.16.14.3)
Installing bourbon (3.1.8)
Installing merit (1.6.1)
Installing similar_text (0.0.4)
Installing net-scp (1.1.2)
Using uglifier (2.2.1)
Installing net-sftp (2.1.2)
Installing net-ssh-gateway (1.2.0)
Installing sprockets (2.10.1)
Installing omniauth (1.1.4)
Installing faraday (0.8.8)
Using rails_12factor (0.0.2)
Installing leaderboard (3.3.0)
Using mail (2.5.4)
Installing compass (0.12.2)
Installing activesupport (4.0.2)
Installing omniauth-oauth (1.0.1)
Installing capistrano (2.15.5)
Installing compass-flexbox (1.1.3)
Installing oauth2 (0.8.1)
Installing compass-rails (1.1.3)
Installing activemodel (4.0.2)
Installing actionpack (4.0.2)
Installing omniauth-twitter (1.0.0)
Installing omniauth-oauth2 (1.1.1)
Installing rvm-capistrano (1.5.0)
Installing actionmailer (4.0.2)
Installing activerecord (4.0.2)
Using sprockets-rails (2.0.1)
Installing omniauth-facebook (1.4.1)
Installing mysql2 (0.3.14)
Installing railties (4.0.2)
Using jquery-rails (3.0.4)
Installing sass-rails (4.0.0)
Installing devise (3.1.0)
Installing rails (4.0.2)
Installing figaro (0.7.0)
Installing therubyracer (0.12.0)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Post-install message from newrelic_rpm:
# New Relic Ruby Agent Release Notes #
## v3.6.7 ##
* Resque-pool support
Resque processes started via the resque-pool gem weren't recognized by the
Ruby agent. The agent now starts correctly in those worker processes.
* Environment-based configuration
All settings in newrelic.yml can now be configured via environment variables.
See https://newrelic.com/docs/ruby/ruby-agent-configuration for full details.
* Fix compatibility issues with excon and curb instrumentation
This release of the agent fixes a warning seen under certain circumstances
with the excon gem (most notably, when excon was used by fog), as well as
a bug with the curb instrumentation that conflicted with the feedzirra gem.
* Allow license key to be set by Capistrano variables
A license key can be passed via a Capistrano variable where previously it
could only be in newrelic.yml. Thanks Chris Marshall for the contribution!
* Make HTTP client instrumentation aware of "Host" request header
If a "Host" header is set explicitly on an HTTP request, that hostname will
be used for external metrics. Thanks Mislav Marohnić for the contribution!
* Fix ActiveSupport::Concern warnings with MethodTracer
Including NewRelic::Agent::MethodTracer in a class using Concerns could cause
deprecation warnings. Thanks Mike Połtyn for the contribution!
* Fix Authlogic constant name
Code checking for the Authlogic module was using in the wrong case. Thanks
Dharam Gollapudi for the contribution!
See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of
changes.
Bundle completed (84.27s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
undefined method `split' for nil:NilClass
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/config/environments/production.rb:59:in `block in <top (required)>'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `configure'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/config/environments/production.rb:1:in `<top (required)>'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/config/environment.rb:5:in `<top (required)>'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_c4ee6d25-fbcb-4b04-85c5-5f602f951339/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54: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
Any help and suggestions are really appreciatable. Thanks
This is the problem:
undefined method `split' for nil:NilClass
It looks like it says it's on line 59 of production.rb -- have you got any reference to a split method in your app (esp the initialization process)?
Please set Heroku Labs: user-env-compile by
heroku labs:enable user-env-compile -a myapp
https://devcenter.heroku.com/articles/labs-user-env-compile
Hi I have a Rails 4 application with Devise, Cancan and Rolify. I was able to deploy it to Heroku before and I am not sure what has changed but I get an error.
I am using ENV variables in my application.yml file and I am pretty sure it has something to do with that and the asset pipeline.
If I add config.assets.initialize_on_precompile = false to my application.rb and run heroku labs:enable user-env-compile -a myapp it works, but I would rather figure out how to avoid doing that.
Running heroku config displays all the ENV variables correctly also.
I guess my questions is what do those two commands above do, and what could be the error and I can push without them.
Thank you, the stack trace below:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using tzinfo (0.3.38)
Using erubis (2.7.0)
Using builder (3.1.4)
Using rack (1.5.2)
Using mime-types (1.25.1)
Using atomic (1.1.14)
Using polyglot (0.3.3)
Using arel (4.0.1)
Using activerecord-deprecated_finders (1.0.3)
Using bcrypt-ruby (3.1.2)
Using sass (3.2.14)
Using cancan (1.6.10)
Using coffee-script-source (1.7.0)
Using execjs (2.0.2)
Using thor (0.18.1)
Using orm_adapter (0.5.0)
Using hike (1.2.3)
Using bundler (1.5.2)
Using tilt (1.4.1)
Using json (1.8.1)
Using pg (0.17.1)
Using rails_stdout_logging (0.0.3)
Using rails_serve_static_assets (0.0.2)
Using rolify (3.4.0)
Using rack-test (0.6.2)
Using treetop (1.4.15)
Using coffee-script (2.2.0)
Using thread_safe (0.1.3)
Using warden (1.2.3)
Using bootstrap-sass (3.1.0.0)
Using sprockets (2.10.1)
Using uglifier (2.4.0)
Using rails_12factor (0.0.2)
Using activesupport (4.0.2)
Using actionpack (4.0.2)
Using jbuilder (1.5.3)
Using railties (4.0.2)
Using sprockets-rails (2.0.1)
Using activemodel (4.0.2)
Using mail (2.5.4)
Using simple_form (3.0.1)
Using activerecord (4.0.2)
Using coffee-rails (4.0.1)
Using devise (3.2.2)
Using sass-rails (4.0.1)
Using actionmailer (4.0.2)
Using jquery-rails (3.1.0)
Using turbolinks (2.2.1)
Using rails (4.0.2)
Using figaro (0.7.0)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (0.70s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `initialize'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `new'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `connect'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:548:in `initialize'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:53:in `connection'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:203:in `table_exists?'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/rolify-3.4.0/lib/rolify/configure.rb:48:in `block in sanity_check'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/rolify-3.4.0/lib/rolify/configure.rb:46:in `each'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/rolify-3.4.0/lib/rolify/configure.rb:46:in `sanity_check'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/rolify-3.4.0/lib/rolify/configure.rb:7:in `configure'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/config/initializers/rolify.rb:1:in `<top (required)>'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/config/environment.rb:5:in `<top (required)>'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_0a6bfc05-e06f-490f-b6ce-b44782a18da0/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54: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
FIX:
Turns out the rolify gem was updated between the last time I pushed to Heroku and now and it broke the precompiling. He fixed it on his master, but not going to update until next release.
Copy and paste the rolify/lib/rolify/configure.rb code into your gem code until it is fixed.
Your application relies on having its environment present to boot. As the Heroku documentation states:
"When deploying if you see something similar to the following:
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port xxxx?
This means that your app is attempting to connect to the database as part of rake assets:precompile. Because the config vars are not present in the environment and this is the mechanism the Heroku uses to configure your database connection, the command is failing. You should be able to see the same error by running this command:"
env -i GEM_PATH=$GEM_PATH \
PATH=$PATH \
DATABASE_URL=postgres://user:pass#127.0.0.1/dbname \
/bin/sh -c 'bundle exec rake --trace assets:precompile'
As for the solution:
"You must fix it by not relying on environment variables and the database to be present at precompile time."
Basically, this is a problem with asset compilation, did you read this blog post ?
My understanding would be that you could also pre-compiled the assets locally :
RAILS_ENV=production bundle exec rake assets:precompile
You can also refer to this heroku help page