I have a RoR application that I'm monitoring with god. I can start the unicorn server without problems using
unicorn -E production -c config/unicorn.rb
and everything works fine. Although when I try to start the server using god like this
god start my-god-task-name
I get the an uninitialized constatnt (NameError) exception and the following output is written to my log file.
/var/www/beta.foerderapp.ch/releases/20140617123149/config/initializers/redis_starter.rb:2:in `<top (required)>': uninitialized constant Redis (NameError)
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/engine.rb:587:in `block in <class:Engine>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /var/www/beta.foerderapp.ch/releases/20140617123149/config/environment.rb:7:in `<top (required)>'
from config.ru:4:in `require'
from config.ru:4:in `block in <main>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn.rb:48:in `eval'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn.rb:48:in `block in builder'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/bin/unicorn_rails:139:in `call'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/bin/unicorn_rails:139:in `block in rails_builder'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in `call'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in `build_app!'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:140:in `start'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/bin/unicorn_rails:23:in `load'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/bin/unicorn_rails:23:in `<main>'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
from /home/luzi/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
Any help is highly appreciated. Thanks!
UPDATE:
The redis gem is installed:
Using rake 10.3.2
Using i18n 0.6.9
Using multi_json 1.10.1
Using activesupport 3.2.9
Using builder 3.0.4
Using activemodel 3.2.9
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.2
Using actionpack 3.2.9
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.4.4
Using actionmailer 3.2.9
Using active_model_serializers 0.8.1
Using arel 3.0.3
Using tzinfo 0.3.39
Using activerecord 3.2.9
Using activeresource 3.2.9
Using rack-ssl 1.3.4
Using json 1.8.1
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.9
Using sass 3.3.8
Using anjlab-bootstrap-rails 3.0.0.3
Using annotate 2.5.0
Using handlebars-source 1.3.0
Using ember-source 1.6.0.beta.5
Using execjs 2.2.0
Using barber 0.4.2
Using bcrypt-ruby 3.0.1
Using colorize 0.7.3
Using net-ssh 2.9.1
Using net-scp 1.2.1
Using sshkit 1.5.1
Using capistrano 3.1.0 from git://github.com/lulezi/capistrano.git (at fix-head-unless-master)
Using coffee-script-source 1.7.0
Using coffee-script 2.2.0
Using coffee-rails 3.2.2
Using ember-data-source 1.0.0.beta.7
Using jquery-rails 3.1.0
Using ember-rails 0.15.0 from git://github.com/emberjs/ember-rails.git (at master)
Using god 0.13.4
Using kgio 2.9.2
Using libv8 3.16.14.3
Using mail_view 2.0.4 from https://github.com/37signals/mail_view.git (at master)
Using mysql2 0.3.16
Using newrelic_rpm 3.8.1.221
Using quiet_assets 1.0.2
Using bundler 1.6.2
Using rails 3.2.9
Using raindrops 0.13.0
Using redis 3.0.7
Using ref 1.0.5
Using sass-rails 3.2.6
Using sqlite3 1.3.9
Using therubyracer 0.12.1
Using turbo-sprockets-rails3 0.3.11
Using uglifier 2.5.1
Using unicorn 4.8.3
Using wicked_pdf 0.10.2
Using wkhtmltopdf-binary 0.9.9.3
Using yaml_db 0.2.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
I've stuck with the same error, and I solve this by change my 'redis.rb' to 'test.rb'. Seems the file name redis.rb confused with the gem lib redis.
Related
Screenshot of error message on Heroku dashboard.
Here's the log (I'm very new to this so I've redacted some stuff in the lower section that looked like it might be private):
-----> Using set buildpack heroku/ruby
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.5
###### 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 bundler 1.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Your Gemfile lists the gem rest-client (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies.....
Using rake 10.5.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using mime-types 2.99
Using arel 6.0.3
Using acts_as_follower 0.2.1
Using acts_as_votable 0.10.0
Using httpclient 2.7.1
Using aws_cf_signer 0.1.3
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using bundler 1.9.7
Using thor 0.19.1
Using concurrent-ruby 1.0.0
Using bcrypt 3.1.10
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using orm_adapter 0.5.0
Using elo 0.1.0
Using exception_handler 0.4.7
Using geocoder 1.3.0
Using gmaps4rails 2.1.2
Using gravtastic 3.2.6
Using tilt 2.0.2
Using hashie 3.4.3
Using high_voltage 2.2.1
Using imgkit 1.6.1
Using multi_json 1.11.2
Using kgio 2.10.0
Using libv8 3.16.14.13
Using newrelic_rpm 3.14.3.313
Using pg 0.18.4
Using pusher-signature 0.1.8
Using rack-cors 0.4.0
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.4
Using raindrops 0.15.0
Using rdiscount 2.1.8
Using redcarpet 3.3.4
Using ref 2.0.0
Using sass 3.4.21
Using rack-test 0.6.3
Using warden 1.2.6
Using mail 2.6.3
Using nokogiri 1.6.7.2
Using algoliasearch 1.7.0
Using unf 0.1.4
Using tzinfo 1.2.2
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using haml 4.0.7
Using omniauth 1.3.1
Using sprockets 3.5.2
Using rollbar 1.4.5
Using pusher 0.16.0
Using rails_12factor 0.0.3
Using unicorn 5.0.1
Using therubyracer 0.12.2
Using loofah 2.0.3
Using impressionist 1.5.1
Using algoliasearch-rails 1.14.1
Using domain_name 0.5.20160128
Using activesupport 4.2.1
Using rails-html-sanitizer 1.0.3
Using http-cookie 1.0.2
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemodel 4.2.1
Using carmen 1.0.2
Using jbuilder 2.4.1
Using rest-client 1.8.0
Using activejob 4.2.1
Using activerecord 4.2.1
Using rails-dom-testing 1.0.7
Using cloudinary 1.1.2
Using friendly_id 5.1.0
Using actionview 4.2.1
Using actionpack 4.2.1
Using actionmailer 4.2.1
Using railties 4.2.1
Using sprockets-rails 3.0.1
Using simple_form 3.2.1
Using rails 4.2.1
Using momentjs-rails 2.11.0
Using coffee-rails 4.1.1
Using jquery-rails 4.1.0
Using responders 2.1.1
Using public_activity 1.4.2
Using sass-rails 5.0.4
Using attachinary 1.3.1
Using carmen-rails 1.0.1
Using rails_autolink 1.1.6
Using bootstrap3-datetimepicker-rails 4.7.14
Using turbolinks 2.5.3
Using commontator 4.10.5
Using devise 3.5.6
Using devise_token_auth 0.1.37
Installing dalli 2.7.6
Bundle complete! 53 Gemfile dependencies, 104 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (6.84s)
Cleaning up the bundler cache.
Your Gemfile lists the gem rest-client (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Removing dalli (2.7.5)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NoMethodError: undefined method `setup' for ExceptionHandler:Module
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/config/initializers/exception_handler.rb:6:in `<top (required)>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/config/environment.rb:5:in `<top (required)>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.1/lib/sprockets/rails/task.rb:62: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
Thanks for all the help
EDIT:
Here is the new build log:
-----> Using set buildpack heroku/ruby
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.5
###### 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 bundler 1.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Your Gemfile lists the gem rest-client (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies.....
Using rake 10.5.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using arel 6.0.3
Using acts_as_follower 0.2.1
Using acts_as_votable 0.10.0
Using httpclient 2.7.1
Using aws_cf_signer 0.1.3
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using bundler 1.9.7
Using thor 0.19.1
Using concurrent-ruby 1.0.0
Using bcrypt 3.1.10
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using orm_adapter 0.5.0
Using elo 0.1.0
Using exception_handler 0.4.7
Installing mime-types 2.99.1
Using gmaps4rails 2.1.2
Using gravtastic 3.2.6
Using tilt 2.0.2
Using hashie 3.4.3
Using high_voltage 2.2.1
Using imgkit 1.6.1
Using multi_json 1.11.2
Using kgio 2.10.0
Using libv8 3.16.14.13
Installing dalli 2.7.6
Using pg 0.18.4
Using pusher-signature 0.1.8
Using rack-cors 0.4.0
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.4
Using raindrops 0.15.0
Using rdiscount 2.1.8
Using redcarpet 3.3.4
Using ref 2.0.0
Using sass 3.4.21
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using warden 1.2.6
Using algoliasearch 1.7.0
Using unf 0.1.4
Using sprockets 3.5.2
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using mail 2.6.3
Using haml 4.0.7
Using omniauth 1.3.1
Using rollbar 1.4.5
Installing geocoder 1.3.1
Using rails_12factor 0.0.3
Using unicorn 5.0.1
Using therubyracer 0.12.2
Using activesupport 4.2.1
Using loofah 2.0.3
Using impressionist 1.5.1
Using algoliasearch-rails 1.14.1
Installing domain_name 0.5.20160216
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemodel 4.2.1
Using carmen 1.0.2
Using jbuilder 2.4.1
Using rails-html-sanitizer 1.0.3
Using http-cookie 1.0.2
Using rails-dom-testing 1.0.7
Using activejob 4.2.1
Using activerecord 4.2.1
Using rest-client 1.8.0
Using actionview 4.2.1
Using friendly_id 5.1.0
Using cloudinary 1.1.2
Using actionpack 4.2.1
Using actionmailer 4.2.1
Using railties 4.2.1
Installing pusher 0.17.0
Using simple_form 3.2.1
Using momentjs-rails 2.11.0
Using coffee-rails 4.1.1
Using jquery-rails 4.1.0
Using responders 2.1.1
Installing sprockets-rails 3.0.2
Using bootstrap3-datetimepicker-rails 4.7.14
Using turbolinks 2.5.3
Using devise 3.5.6
Using rails 4.2.1
Using sass-rails 5.0.4
Using attachinary 1.3.1
Using carmen-rails 1.0.1
Using commontator 4.10.5
Using devise_token_auth 0.1.37
Using rails_autolink 1.1.6
Installing public_activity 1.4.3
Installing newrelic_rpm 3.15.0.314
Bundle complete! 53 Gemfile dependencies, 104 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (7.39s)
Cleaning up the bundler cache.
Your Gemfile lists the gem rest-client (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Removing public_activity (1.4.2)
Removing domain_name (0.5.20160128)
Removing pusher (0.16.0)
Removing mime-types (2.99)
Removing dalli (2.7.5)
Removing newrelic_rpm (3.14.3.313)
Removing sprockets-rails (3.0.1)
Removing geocoder (1.3.0)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NoMethodError: undefined method `setup' for ExceptionHandler:Module
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/config/initializers/exception_handler.rb:6:in `<top (required)>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/config/environment.rb:5:in `<top (required)>'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_(REDACTED IN CASE IT IS PRIVATE)/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-3.0.2/lib/sprockets/rails/task.rb:62: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
From the Heroku docs:
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, we use a placeholder DATABASE_URL to satisfy Rails.
To resolve this issue, ensure that the following line appears in your config/application.rb:
# config/application.rb
config.assets.initialize_on_precompile = false
Once added, commit your change and redeploy to Heroku – your assets should compile without your app attempting to connect to the database, which should resolve the error you're witnessing.
UPDATE:
Line 46 of your stacktrace includes the following message: Devise.secret_key was not set.
According to the author of Devise, José Valim, this issue can be resolved in the following manner:
Please add the following to your Devise initializer:
config.secret_key = '-- secret key --'
Alternatively, the following solution seems to have worked for a number of users:
I went to my routes.rb file and commented out the line devise_for :installs
Then I went back and reran rails generate devise:install. If that doesn't work, use the previous version of devise by editing your Gemfile's reference to Devise like this: gem 'devise', '3.0.3' and then follow the steps i mentioned above.
Please look at https://stackoverflow.com/a/19650687/1380867 and thanks
zeantsoi for this answer
I made ExceptionHandler and it seems it's causing the issue...
NoMethodError: undefined method `setup' for ExceptionHandler:Module
In ExceptionHandler > 0.4.5, the initializer has been replaced with config methods:
From the docs:
IMPORTANT
If you're upgrading to 0.4.6, you need to remove your exception_handler initializer.
We've changed the load process to use Rails app config - you don't need the exception_handler initializer any more
You need to copy your exception_handler settings from config/initializers/exception_handler.rb and place them into config/production.rb.
You need to delete config/initializers/exception_handler.rb
--
I am available to chat if you leave a comment etc
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 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
I am trying to launch a rails application with mongrel on windows xp.
I believe the following error is version-specific but cannot pinpoint exactly what is missing (a gem overlooked perhaps or an incompatible version?)
My ruby version
C:\ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
* LOCAL GEMS *
abstract (1.0.0)
actionmailer (3.0.4.rc1, 3.0.3, 2.2.3)
actionpack (3.0.4.rc1, 3.0.3, 2.2.3)
activemodel (3.0.4.rc1, 3.0.3)
activerecord (3.0.4.rc1, 3.0.3, 2.2.3)
activeresource (3.0.4.rc1, 3.0.3, 2.2.3)
activesupport (3.0.4.rc1, 3.0.3, 2.2.3)
arel (2.0.7)
builder (2.1.2)
bundler (1.0.10)
cgi_multipart_eof_fix (2.5.0)
erubis (2.6.6)
gem_plugin (0.2.3)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
minitest (1.6.0)
mongrel (1.2.0.pre2 x86-mingw32, 1.1.5 x86-mingw32)
mongrel_service (0.4.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.4.rc1, 3.0.3, 2.2.3)
railties (3.0.4.rc1, 3.0.3)
rake (0.8.7)
rdoc (2.5.8)
rubygems-update (1.5.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
In my working directory I attempt to start the app with this command:
mongrel_rails start -e development -b 127.0.0.1 -p 3000
The error is:
C:\myApp>mongrel_rails start -e development -a 127.0.0.1 -p 3000
** Starting Mongrel listening at 127.0.0.1:3000
** Starting Rails with development environment...
:29:in require': no such file to load--
C:/myApp/config/../vendor/rails/railties/lib/initializer (LoadError)
from <internal:lib/rubygems/custom_require>:29:inrequire'
from C:/myApp/config/boot.rb:45:in load_initializer'
from C:/myApp/config/boot.rb:38:inrun'
from C:/myApp/config/boot.rb:11:in boot!'
from C:/myApp/config/boot.rb:109:in'
from :29:in require'
from <internal:lib/rubygems/custom_require>:29:inrequire'
from C:/myApp/config/environment.rb:11:in <top (required)>'
from <internal:lib/rubygems/custom_require>:29:inrequire'
from :29:in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/rails.rb:147:inrails'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:116:in block (2 levels) in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:149:incall'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:149:in listener'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:102:inblock in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:in call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:ininitialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:in new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:inrun'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/command.rb:210:in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:282:in'
from C:/Ruby192/bin/mongrel_rails:19:in load'
from C:/Ruby192/bin/mongrel_rails:19:in'
Any ideas or direction on how to about resolving this will much appreciated.If I am missing a file or gem, or if it is a version conflict, it is not clear which one is it.
Also given the different versions on the same gem installed, how could I start the rails app on mongrel specifying exactly what versions I want to use?
Thanks!
would you please paste the contents of your gem file?
make sure you have:
gem 'mongrel', '>= 1.2.0.pre2'
then run bundle install to update your gem.
run server: rails server mongrel