I have troubles deploying my RoR-app to Heroku. I've changed the database to postgresql, so thats ok. But I get an error with the simple_form gem. I've tried many different approaches available on the net, but no go..
Here's the error message:
rake aborted!
NameError: uninitialized constant SimpleForm
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/config/initializers/simple_form.rb:2:in `<top (required)>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/config/environment.rb:5:in `<top (required)>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.0/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
Here's the new error message, after adding require 'simple_form' in the simple_form.rb
LoadError: cannot load such file -- simple_form
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/config/initializers/simple_form.rb:1:in `<top (required)>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/config/environment.rb:5:in `<top (required)>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.0/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
I found out what the problem was. I had placed gems used in the application under development and test in the Gemfile. This resulted in that the Gems were not included in the deployment. I got the same error for bootstrap, so next time I will be sure to add gems outside the dev and test clause.
Thanks for the help though :)
I think you have not pushed your updated Gemfile and Gemfile.lock on heroku.
Related
I support Rails 4.2.5 application on Ruby 2.5. Packages and rails are ok, but when I run rake assets:precompile I have error.
eric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `join'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `initialize'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:19:in `initialize'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `new'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `attach_to'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:75:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:2:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:138:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `public_send'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `method_missing'
/wealthoz/config/environment.rb:5:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
I don't deploy intro docker containers on ruby 2.5 image.
If you are on production environment, try RAILS_ENV=production rake assets:precompile
I think you should stick with Ruby 2.3, you could experience many runtime errors with 2.5 (like this one you reported)
I'm trying to push my changes to Heroku with the following command: git push heroku master
When running the rake assets:precompile, I get the following error(s):
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NameError: undefined local variable or method `fkalkhalidi' for #<Pinteresting::Application:0x007f48fd2d6fc0>
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/config/environments/production.rb:80:in `block in <top (required)>'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/railtie.rb:210:in `instance_eval'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/railtie.rb:210:in `configure'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/config/environments/production.rb:1:in `<top (required)>'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:593:in `each'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:593:in `block in <class:Engine>'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `run'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:44:in `each'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application.rb:300:in `initialize!'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/config/environment.rb:5:in `<top (required)>'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_deb19ff2fabe605365740a1f29b87f8b/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.2.0/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
Appreciate any help. First time learning RoR.
What's inside the file config/environments/production.rb at line 80?
Search your code, specifically in the production.rb file. It's likely there is a fkalkhalidi string somewhere that is causing the error.
I am trying to create a Rails app in Heroku. I run it locally(nitrous.io) and works fine. I am not sure what is going on here and no idea what I did wrong. I have already read many other answers on SO but none seemed to work for me. I hope someone has experience with this and can help me out!
Following the directions here I already added this:
#config/application.rb
config.serve_static_assets = true
#Gemfile
gem 'rails_12factor', group: :production
.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
IndexError: string not matched
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:76:in `[]='
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:76:in `block in config'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:74:in `tap'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:74:in `config'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:69:in `resolve'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/core.rb:46:in `configurations='
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:128:in `block (2 levels) in <class:Railtie>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/config/environment.rb:5:in `<top (required)>'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/tmp/build_5191aa8d-0f78-44fd-a9ad-b6620c655951/vendor/bundle/ruby/2.1.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
IndexError: string not matched
Indicates that somewhere a string is being accessed as a Hash. For example
#name = 'John'
#name['b'] => will throw this error
Take a look at your config files, it seems to halt there.
I've added Twilio to my rails app and when I go to push the changes to heroku I'm getting the following error. I've having trouble tracing it back to the issue.
Running: rake assets:precompile
rake aborted!
undefined method `strip' for nil:NilClass
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/twilio-ruby-3.11.5/lib/twilio-ruby/rest/client.rb:142:in `initialize'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `new'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/environment.rb:5:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/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)
Update: In my Twilio.rb (config/initializer) I had copied over some code from Twilio's site.
require "twilio-ruby"
Once I removed this I was able to get it to push to heroku.
I am having difficulties troubleshooting the following and figuring out why my assets are failing to precompile at slug compilation... the odd thing is, is that the assets compile fine at runtime when I check the live logs... any ideas? Is it trying to connect to the database?
Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
undefined method `match' for nil:NilClass
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions/mongo_uri.rb:49:in `initialize'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions/factory.rb:104:in `new'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions/factory.rb:104:in `parse'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions/factory.rb:62:in `create_session'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions/factory.rb:43:in `default'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/sessions.rb:109:in `default'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid.rb:129:in `default_session'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.4/lib/mongoid/railtie.rb:131:in `block (2 levels) in <class:Railtie>'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `call'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/config/environment.rb:5:in `<top (required)>'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:103:in `require_environment!'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
/tmp/build_27348f41-abb7-46f0-a7ac-6f66bf0feff7/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
Check whether your asset precompile requires access to ENV variables during when its run. Its hard to tell from your stack trace, but this might be a good resource to check out: https://devcenter.heroku.com/articles/rails-asset-pipeline
Essentially, you can enable the user-env-compile labs feature on heroku to give your app instance access to ENV vars during your precompile.
heroku labs:enable user-env-compile -a myapp
more information about that here: https://devcenter.heroku.com/articles/labs-user-env-compile
I had just added Unicorn, I added the following to my application.rb in config and was able to precompile:
config.assets.initialize_on_precompile = false