Hi I'm a new Ruby on rails student and currently having a problem Git Pushing to Heroku after implementing Divise.
I'm getting the following error
Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environments/production.rb:83: unterminated string meets end of file
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environments/production.rb:83: syntax error, unexpected end-of-input, expecting '}'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/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_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environment.rb:5:in `<top (required)>'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/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
From researching online, it seems like the solution should be putting
#required for Heroku
config.assets.initialize_on_precompile = false
in application.rb, but that isn't working for.
Any thoughts?
Here's the Github page
https://github.com/cablecharlz/pinteresting
Thanks in advance,
Charles
Try to read the error message.
Seems like you having issue "syntax error, unexpected end-of-input, expecting '}'" in
/config/environments/production.rb
line: 83
Related
Installing node-v6.11.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
SyntaxError: /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/config/routes.rb:4: syntax error, unexpected keyword_end, expecting end-of-input
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `block in load_paths'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `each'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `load_paths'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:18:in `reload!'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:41:in `block in updater'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/file_update_checker.rb:81:in `execute'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:42:in `updater'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:31:in `execute_if_updated'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/finisher.rb:128:in `block in <module:Finisher>'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/config/environment.rb:5:in `<top (required)>'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/rake- 12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Super new to this stuff, following this tutorial: http://installfest.railsbridge.org/installfest/deploy_a_rails_app
I'm not sure why I am getting this precompile error here after entering command "git push heroku master". Also when I look in the tmp folder for the file that throws the syntax error, it doesn't show up (probably because it goes away after running the command).
In my routes.rb file I have:
root 'drinks#index'
resources :drinks
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
The problem is that you have a syntax error in your routes.rb. The parser is finding an end with no corresponding do (beginning). Your complete routes.rb should look like this:
Rails.application.routes.draw do
root 'drinks#index'
resources :drinks
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
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.
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 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.