Heroku Precompiled Assets Failed - ruby-on-rails

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

Related

Error deploying Rails app to Heroku: simple_form issue

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.

heroku push error: "rake assets:precompile rake aborted!"

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.

Migration error on heroku deploy

NoMethodError: undefined method `dump_schema_after_migration=' for ActiveRecord:
:Base:Class
on
$ heroku run rake db:migrate
I am new to heroku deployment and not able to solve it, please help in solving it
Thanks in advance.
this is what I am actually getting.
$ heroku run rake db:migrate
This is the complete error trace:
Running `rake db:migrate` attached to terminal... up, run.4727
rake aborted!
NoMethodError: undefined method `dump_schema_after_migration=' for ActiveRecord:
:Base:Class
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/dynamic_
matchers.rb:22:in `method_missing'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/railtie.
rb:166:in `block (3 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/railtie.
rb:165:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/railtie.
rb:165:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/lazy_l
oad_hooks.rb:38:in `instance_eval'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/lazy_l
oad_hooks.rb:38:in `execute_hook'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/lazy_l
oad_hooks.rb:28:in `block in on_load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/lazy_l
oad_hooks.rb:27:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/lazy_l
oad_hooks.rb:27:in `on_load'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/railtie.
rb:114:in `block in <class:Railtie>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:30:
in `instance_exec'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:30:
in `run'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:55:
in `block in run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/initializable.rb:54:
in `run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/application.rb:215:i
n `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/depend
encies.rb:229:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/depend
encies.rb:229:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/depend
encies.rb:214:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/depend
encies.rb:229:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/application.rb:189:i
n `require_environment!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/application.rb:250:i
n `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Assuming you are using Rais 4, just remove below code in your config/environments/production.rb
config.active_record.dump_schema_after_migration = false

Rails 4 Heroku assets:precompile 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.

Cannot load Rails app fetched from GitHub; rake, rails server not working

I cloned an app folder from a GitHub repository, and after bundle install the gems, I tried to use the rake db:reset and rake db:migrate commands, neither worked, and here is my error message:
>[app_folder]rake db:reset
rake aborted!
Could not load database configuration. No such file - /Users/harry/Dropbox/apps/app_folder/config/database.yml
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application/configuration.rb:110:in `database_configuration'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activerecord-4.0.0/lib/active_record/railtie.rb:174:in `block (2 levels) in <class:Railtie>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activerecord-4.0.0/lib/active_record/railtie.rb:173:in `block in <class:Railtie>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/harry/Dropbox/apps/app_folder/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:reset => environment
(See full trace by running task with --trace)
[app_folder]
I get similar errors when I try to run rails server or rails console. Would really appreciate any help!! Thanks a lot!
Usually rails apps have config/database.yml.example, copy this file to config/database.yml and overwrite database connection settings if necessary.

Resources