I've gone through MANY forum posts about this exact problem and I have not found a solution.
App works locally but not on Heroku.
http://majorleaguebetting.herokuapp.com/
What am I missing??!!
Heroku Logs:
searoth#searoth-VB:~/Desktop/rails_projects/MajorLeagueBetting$ heroku logs
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:14:26+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:14:26+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:14:28+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:14:28+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-01T20:24:39+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-01T20:24:42+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 34898`
2013-04-01T20:24:48+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:24:48+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:24:52+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:8:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `<class:Head2headBet>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:3:in `require'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:1:in `new'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-04-01T20:24:53+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:24:53+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:24:54+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-01T20:24:54+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:34:59+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-01T20:35:01+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 15944`
2013-04-01T20:35:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for mo
re on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:35:04+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T20:35:08+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2013-04-01T20:35:08+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `<class:Head2headBet>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:8:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-04-01T20:35:08+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:3:in `require'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:1:in `new'
2013-04-01T20:35:08+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-04-01T20:35:08+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2013-04-01T20:35:10+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T20:35:10+00:00 heroku[web.1]: State changed from starting to crashed
Here is the gemfile
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem 'railties', '3.2.13'
gem 'execjs'
gem 'therubyracer', '0.11.4'
gem 'jquery-rails'
gem 'nokogiri', '1.5.0'
gem "colorbox-rails", "~> 0.0.7"
gem 'formtastic'
gem 'tabletastic'
gem "paperclip", "~> 2.4"
gem 'faker', '0.3.1'
gem 'thin'
gem 'pg'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'sqlite3', :group => [:development, :test]
group :development, :test do
gem 'rspec-rails', '~> 2.6'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end
group :test do
gem 'rspec-rails', '~> 2.6'
# Pretty printed test output
gem 'turn', :require => false
gem 'factory_girl_rails', '1.0'
end
group :production do
gem 'thin'
gem 'pg'
end
Looks like you have forgotten to migrate
heroku run rake db:migrate
the clue is in
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined local variable or method `current_user' for Head2headBet(Table doesn't exist):Class (NameError)
2013-04-01T20:24:53+00:00 app[web.1]: from /app/app/models/head2head_bet.rb:12:in `'
Depending on the state of your database you may try any of the following commands
heroku run rake db:migrate
heroku run rake db:reset # WARNING DESTRUCTIVE
heroku run rake db:setup # WARNING DESTRUCTIVE
as John Baynon said, the clue is in table doesnt exist line
Related
My Heroku app is crashing because of a 'missing helper file helpers/factory_girl.rb', even though it works on local and FactoryGirl is only installed in my Gemfile test group.
Why is Heroku asking for my FactoryGirl helper when it's not needed in development and isn't specified as a production gem?
What is helpers/factory_girl.rb supposed to look like? I searched online and couldn't find anything. Would a completely blank file work?
I am running Rails 3.2.13, Ruby 2.0.0-p481, and factory_girl_rails 4.4.1.
Gemfile:
group :test do
gem "factory_girl_rails", ">= 4.0"
end
Heroku logs:
2015-01-31T02:16:01.071477+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on': Missing helper file helpers/factory_girl.rb (LoadError)
2015-01-31T02:16:01.071484+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
2015-01-31T02:16:01.071515+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
2015-01-31T02:16:01.071524+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
2015-01-31T02:16:01.071522+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:131:in `map!'
2015-01-31T02:16:01.071487+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2015-01-31T02:16:01.071526+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
2015-01-31T02:16:01.071530+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/railties/paths.rb:18:in `block (2 levels) in with'
2015-01-31T02:16:01.071533+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:4:in `<top (required)>'
2015-01-31T02:16:01.071535+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071537+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2015-01-31T02:16:01.071528+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:95:in `helper'
2015-01-31T02:16:01.071538+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-01-31T02:16:01.071540+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071581+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071570+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2015-01-31T02:16:01.071572+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2015-01-31T02:16:01.071574+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2015-01-31T02:16:01.071576+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2015-01-31T02:16:01.071583+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_suppor
t/dependencies.rb:251:in `block in require'
2015-01-31T02:16:01.071578+00:00 app[web.1]: from /app/app/controllers/activations_controller.rb:1:in `<top (required)>'
2015-01-31T02:16:01.071550+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2015-01-31T02:16:01.071647+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2015-01-31T02:16:01.071633+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2015-01-31T02:16:01.071622+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-01-31T02:16:01.071625+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2015-01-31T02:16:01.071627+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2015-01-31T02:16:01.071629+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2015-01-31T02:16:01.071631+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2015-01-31T02:16:01.071640+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2015-01-31T02:16:01.071642+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2015-01-31T02:16:01.071644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2015-01-31T02:16:01.071648+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2015-01-31T02:16:01.071654+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-01-31T02:16:01.071650+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2015-01-31T02:16:01.071652+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2015-01-31T02:16:01.071656+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2015-01-31T02:16:01.071658+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2015-01-31T02:16:01.071659+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2015-01-31T02:16:01.071661+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2015-01-31T02:16:01.071688+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2015-01-31T02:16:01.071690+00:00 app[web.1]: from /app/config.ru:3:in `require'
2015-01-31T02:16:01.071692+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2015-01-31T02:16:01.071693+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2015-01-31T02:16:01.071695+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2015-01-31T02:16:01.071698+00:00 app[web.1]: from /app/config.ru:1:in `new'
2015-01-31T02:16:01.071699+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2015-01-31T02:16:01.071701+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `eval'
2015-01-31T02:16:01.071703+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `load'
2015-01-31T02:16:01.071705+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/rack/adapter/loader.rb:42:in `for'
2015-01-31T02:16:01.071707+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:170:in `load_adapter'
2015-01-31T02:16:01.071709+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:74:in `start'
2015-01-31T02:16:01.071711+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
2015-01-31T02:16:01.071713+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
2015-01-31T02:16:01.071715+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
2015-01-31T02:16:01.071717+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2015-01-31T02:16:01.071719+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2015-01-31T02:16:01.971364+00:00 heroku[web.1]: Process exited with status 1
2015-01-31T02:16:01.976052+00:00 heroku[web.1]: State changed from starting to crashed
I think heroku's RAILS_ENV is production as below.
$ heroku config
=== app_name Config Vars
CLEARDB_DATABASE_URL: mysql://...
DATABASE_URL: mysql2://...
LANG: en_US.UTF-8
RACK_ENV: production
RAILS_ENV: production
SECRET_KEY_BASE: ....
That's why factory_girl in test group doesn't work well on heroku.
One of solution is just add production group. But, it not good idea.
group :test, :production do
gem "factory_girl_rails", ">= 4.0"
end
I think if you just load test data on heroku for test, I suggets as below.
# run to load test data
rake db:data_import
# test data import rake file
# deta_import.rb
if Rails.env.production?
require "factory_girl_rails"
FactoryGirl.find_definitions
end
... test data import with FactoryGirl ...
I am using locomotive CMS and have created an app with their engine and have followed all the steps to upload it to Heroku. However, when I try to open the app using my URL, I get an application error that says that "An error occurred in the application and your page could not be served. Please try again in a few moments." Below is the log details. Can someone tell me what is going wrong?
2014-02-22T18:27:10.019069+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid.rb:165:in `load!'
2014-02-22T18:27:10.019069+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/config/environment.rb:40:in `load_yaml'
2014-02-22T18:27:10.019069+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
2014-02-22T18:27:10.019069+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from config.ru:3:in `require'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from config.ru:1:in `new'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from config.ru:1:in `<main>'
2014-02-22T18:27:10.019321+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
2014-02-22T18:27:10.019502+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2014-02-22T18:27:09.945557+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2014-02-22T18:27:10.020070+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2014-02-22T18:27:11.123783+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-02-22T18:27:11.123783+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-02-22T18:27:11.331326+00:00 heroku[web.1]: Process exited with status 1
2014-02-22T18:27:11.350265+00:00 heroku[web.1]: Process exited with status 1
2014-02-22T18:27:12.266238+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 22 column 7 (Psych::SyntaxError)
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:127:in `load'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:151:in `parse'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/config/environment.rb:40:in `load_yaml'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/config.rb:89:in `load!'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid.rb:165:in `load!'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
2014-02-22T18:27:12.266238+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/railtie.rb:67:in `block in <class:Railtie>'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from config.ru:3:in `require'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load'
2014-02-22T18:27:12.266588+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from config.ru:1:in `new'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from config.ru:1:in `<main>'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2014-02-22T18:27:12.266869+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
2014-02-22T18:27:12.267626+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2014-02-22T18:27:13.659542+00:00 heroku[web.1]: State changed from starting to crashed
2014-02-22T18:27:13.659542+00:00 heroku[web.1]: State changed from crashed to starting
2014-02-22T18:27:13.641921+00:00 heroku[web.1]: Process exited with status 1
2014-02-22T18:27:21.169905+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 38322`
2014-02-22T18:27:47.282641+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-02-22T18:27:47.284111+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:151:in `parse'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/config.rb:89:in `load!'
2014-02-22T18:27:49.769965+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): did not find expected key while parsing a block mapping at line 22 column 7 (Psych::SyntaxError)
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/config/environment.rb:40:in `load_yaml'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/railtie.rb:67:in `block in <class:Railtie>'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/psych.rb:127:in `load'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid.rb:165:in `load!'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
2014-02-22T18:27:49.769965+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from config.ru:3:in `require'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from config.ru:1:in `new'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from config.ru:1:in `<main>'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval'
2014-02-22T18:27:49.770232+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
2014-02-22T18:27:49.770412+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
2014-02-22T18:27:51.265166+00:00 heroku[web.1]: Process exited with status 1
2014-02-22T18:27:51.276294+00:00 heroku[web.1]: State changed from starting to crashed
2014-02-22T18:27:53.791976+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=danacamilleapp.herokuapp.com request_id=13abf837-1e73-468e-8d33-011ed163f1e3 fwd="72.89.235.136" dyno= connect= service= status=503 bytes=
This is my mongoid.yml file:
development:
sessions:
default:
database: locomotive_dev
hosts:
- localhost:27017
options:
identity_map_enabled: true
test:
sessions:
default:
database: locomotive_test
hosts:
- localhost:27017
options:
identity_map_enabled: true
production:
sessions:
default:
database: locomotive_production
# heroku
uri: <%= ENV['MONGOHQ_URL'] %>
hosts:
- localhost:27017
options:
identity_map_enabled: true
You have an extra space before uri which causes your yaml to be invalid. You can check it at http://yamllint.com
I've been trying succesfully deploy my app!
Went on my site and it says the annoying old application error,
so i checked my logs and this is what I see
2013-05-05T10:42:16.387820+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
2013-05-05T10:42:16.387760+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
2013-05-05T10:42:16.387103+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-05-05T10:42:16.387411+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-05-05T10:42:16.387878+00:00 app[web.1]: from script/rails:6:in `require'
2013-05-05T10:42:16.387955+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-05-05T10:42:16.387701+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-05-05T10:42:16.387353+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-05-05T10:52:32.322631+00:00 heroku[web.1]: State changed from crashed to starting
2013-05-05T10:52:33.807655+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 25083`
2013-05-05T10:52:38.866563+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-05T10:52:38.867009+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-05T10:52:41.559472+00:00 app[web.1]: => Call with -d to detach
2013-05-05T10:52:41.559472+00:00 app[web.1]: /app/app/models/follow.rb:3:in `<class:Follow>': uninitialized constant Follow::ActsAsFollower (NameError)
2013-05-05T10:52:41.559472+00:00 app[web.1]: from /app/app/models/follow.rb:1:in `<top (required)>'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
2013-05-05T10:52:41.559472+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
2013-05-05T10:52:41.559472+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-05-05T10:52:41.559472+00:00 app[web.1]: Exiting
2013-05-05T10:52:41.559472+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
2013-05-05T10:52:41.559472+00:00 app[web.1]: => Rails 3.2.12 application starting in production on `http://0.0.0.0:25083`
2013-05-05T10:52:41.559472+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-05-05T10:52:41.559472+00:00 app[web.1]: => Booting WEBrick
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/config.ru:in `new'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-05-05T10:52:41.559812+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-05-05T10:52:41.560044+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-05-05T10:52:41.560273+00:00 app[web.1]: from script/rails:6:in `require'
2013-05-05T10:52:42.686557+00:00 heroku[web.1]: State changed from starting to crashed
2013-05-05T10:52:42.675574+00:00 heroku[web.1]: Process exited with status 1
2013-05-05T10:54:41.605956+00:00 heroku[slugc]: Slug compilation started
2013-05-05T10:55:31.425752+00:00 heroku[api]: Release v11 created by coreypizzle#gmail.com
2013-05-05T10:55:31.456611+00:00 heroku[api]: Deploy b7f5371 by coreypizzle#gmail.com
2013-05-05T10:55:31.596595+00:00 heroku[web.1]: State changed from crashed to starting
2013-05-05T10:55:32.004776+00:00 heroku[slugc]: Slug compilation finished
2013-05-05T10:55:33.337343+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 13044`
2013-05-05T10:55:37.791655+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (re
quired)> at /app/config/environment.rb:5)
2013-05-05T10:55:37.792002+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-05-05T10:55:40.844352+00:00 app[web.1]: => Booting WEBrick
2013-05-05T10:55:40.844352+00:00 app[web.1]: => Rails 3.2.12 application starting in production on http://0.0.0.0:13044
2013-05-05T10:55:40.844352+00:00 app[web.1]: => Call with -d to detach
2013-05-05T10:55:40.844352+00:00 app[web.1]: Exiting
2013-05-05T10:55:40.844352+00:00 app[web.1]: from /app/app/models/follow.rb:1:in `<top (required)>'
2013-05-05T10:55:40.844352+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-05-05T10:55:40.844352+00:00 app[web.1]: /app/app/models/follow.rb:3:in `<class:Follow>': uninitialized constant Follow::ActsAsFollower (NameError)
2013-05-05T10:55:40.844352+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-05-05T10:55:40.844352+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
2013-05-05T10:55:40.844352+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
2013-05-05T10:55:40.844819+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/config.ru:in `new'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from script/rails:6:in `require'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
2013-05-05T10:55:40.845413+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-05-05T10:55:40.845122+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-05-05T10:55:42.225191+00:00 heroku[web.1]: Process exited with status 1
2013-05-05T10:55:42.238768+00:00 heroku[web.1]: State changed from starting to crashed
2013-05-05T10:56:54.541931+00:00 heroku[api]: Scale to web=1 by coreypizzle#gmail.com
The error is
/app/app/models/follow.rb:3:in `<class:Follow>': uninitialized constant Follow::ActsAsFollower (NameError)
Make sure the plugin you are using is properly loaded and listed in your Gemfile.
My website, hosted in Heroku, has been working fine with Rails 3.2.8. I'm using a route constraint class with the HighVoltage gem for static (mostly) webpages:
routes.rb:
get "/*id" => "high_voltage/pages#show", constraints: Constraints::StaticPage.new
I have a file in /lib/constraints/static_page.rb:
module Constraints
class StaticPage
def matches?(request)
File.exist? file_path(request.path)
end
private
def file_path(view)
static_page_views_dir.to_s.concat("#{view}.html.erb")
end
def static_page_views_dir
Rails.root.join('app', 'views', 'pages')
end
end
end
Problem is, I just updated to Rails 3.2.9 and did a git push heroku and my app crashed :(
my-host:my-site scott$ heroku ps
=== web: `bundle exec rails server -p $PORT`
web.1: crashed 2012/11/14 12:14:41 (~ 2s ago)
Apparently, Ruby/Heroku can't find my Constraints::StaticPage class. I have it required at the top of my routes.rb:
require 'constraints/static_page'
Did something change in Rails 3.2.9 so that no longer works with Heroku? Locally everything works fine, just not in Heroku. If I take out that constraint in my route, everything works perfect (aside from not having those constraints). Here's my heroku logs output:
2012-11-14T20:14:36+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-14T20:14:36+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-14T20:14:38+00:00 app[web.1]: => Booting WEBrick
2012-11-14T20:14:38+00:00 app[web.1]: => Rails 3.2.9 application starting in production on http://0.0.0.0:18361
2012-11-14T20:14:38+00:00 app[web.1]: => Call with -d to detach
2012-11-14T20:14:38+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-11-14T20:14:38+00:00 app[web.1]: Exiting
2012-11-14T20:14:38+00:00 app[web.1]: /app/config/routes.rb:50:in `block in <top (required)>': uninitialized constant ActionDispatch::Routing::Mapper::Constraints::StaticPage (NameError)
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:260:in `draw'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/config/routes.rb:3:in `<top (required)>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `each'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/lazy_load_hooks.rb:42:in `each'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `load_paths'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/rails.rb:14:in `block in <class:Engine>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:16:in `reload!'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:108:in `reload_routes!'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/lazy_load_hooks.rb:34:in `call'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/server.rb:46:in `app'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/server.rb:70:in `start'
2012-11-14T20:14:38+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-11-14T20:14:38+00:00 app[web.1]: from script/rails:6:in `require'
2012-11-14T20:14:38+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-11-14T20:14:40+00:00 heroku[web.1]: Process exited with status 1
2012-11-14T20:14:40+00:00 heroku[web.1]: State changed from starting to crashed
Can you try out the following versions in your Gemfile:
# Gemfile
gem 'rails', '3.2.9'
gem 'high_voltage', '~> 1.2.1'
gem 'thin'
# ...
The 1.2.1 release of High Voltage has the root route constraints baked into it. This will allow you to remove the routes completely from your config/routes.rb file.
Just set up an initializer for High Voltage:
# config/initializers/high_voltage.rb
HighVoltage.route_drawer = HighVoltage::RouteDrawers::Root
I deployed the above to a Cedar app on Heroku and it ran as expected.
EDIT: The general advice is to use CEDAR stack.
Pretty new to RoR, Gems, Heroku and Git. Following tutorial: http://ruby.railstutorial.org/book/ruby-on-rails-tutorial
Works smoothly on localhost, when deployed to Heroku got ConnectionNotEstablished error, that was solved here:
https://stackoverflow.com/questions/7542745/heroku-error-activerecordconnectionnotestablished (BTW: following same tutorial) After changing production database to PostgreSQL (gem 'pg') it generates another error:
Visting live site
An error occurred in the application and your page could not be
served. Please try again in a few moments.
If you are the application owner, check your logs for details.
Tried this -
Heroku app crashed, receiving "Invalid DATABASE URL" when attempting heroku rake db:migrate -
heroku rake db:migrate
rake aborted!
Invalid DATABASE_URL
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
heroku console
Internal server error
gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.1'
group :development do
gem 'rspec-rails', '2.6.1'
gem 'annotate', '~> 2.4.1.beta'
gem 'sqlite3'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
heroku logs
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
9:02+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
9:02+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>'
9:02+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
9:03+00:00 heroku[web.1]: State changed from starting to crashed
9:04+00:00 heroku[web.1]: Process exited
1:58+00:00 heroku[slugc]: Slug compilation started
3:09+00:00 heroku[api]: Deploy 3dea426 by mstefanow#gmail.com
3:09+00:00 heroku[api]: Release v7 created by mstefanow#gmail.com
3:09+00:00 heroku[web.1]: State changed from crashed to created
3:09+00:00 heroku[web.1]: State changed from created to starting
3:10+00:00 heroku[slugc]: Slug compilation finished
3:12+00:00 heroku[web.1]: Starting process with command `thin -p 44881 -e production -R /home/heroku_rack/heroku.ru start`
3:15+00:00 app[web.1]: (erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
3:15+00:00 app[web.1]: from (erb):6:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/configuration.rb:106:in `database_configuration'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/railtie.rb:68:in `block (2 levels) in <class:Railtie>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record/base.rb:2190:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:489:in `load_missing_constant'
3:15+00:00 app[web.1]: from /app/app/models/user.rb:12:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:179:in `const_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:124:in `block in constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `each'
3:15+00:00 a
from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/inflector/methods.rb:123:in `constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:181:in `block in const_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:148:in `_default_wrap_model'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:167:in `_set_wrapper_defaults'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/metal/params_wrapper.rb:128:in `inherited'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in wi
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
3:15+00:00 app[web.1]: from /app/app/controllers/users_controller.rb:1:in `<top (required)>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:302:in `depend_on'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:214:in `require_dependency'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:416:in `block in eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:414:in `eager_load!'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
3:15+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
3:15+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
3:15+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
3:15+00:00 app[web.1]: from config.ru:3:in `block (3 levels) in <main>'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:120:in `new'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:120:in `map'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `new'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
3:15+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
3:15+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `eval'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `load'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:175:in `load_rackup_config'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:65:in `start'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>'
3:15+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
3:16+00:00 heroku[web.1]: State changed from starting to crashed
3:17+00:00 heroku[web.1]: Process exited
5:55+00:00 heroku[router]: Error H10 (App crashed) -> GET high-wind-7473.heroku.com/pages/home dyno= queue= wait= service= status=503 bytes=
5:57+00:00 heroku[router]: Error H10 (App crashed) -> GET high-wind-7473.heroku.com/pages/home dyno= queue= wait= service= status=503 bytes=
Kind of stuck, please help (point in right direction)
Of course
bundle install
git add .
git commit -m "another heroku fix"
git push
git push heroku
You need to set the DATABASE_URL environment variable with the path to your online postgres db.
Try running heroku pg. If the output is "myapp has no heroku-postgresql databases." then you need to add the PostgreSQL add-on first. It will create a postgres db for you on Amazon AWS.
heroku addons:add heroku-postgresql:hobby-basic
(hobby-basic is the free plan)
To find the URL for your new database, run
heroku config
You should see a variable that starts with HEROKU_POSTGRESQL. Copy its value (it should start with postgres:// and use it to set the DATABASE_URL
heroku config:set DATABASE_URL=postgres://your-db-url
I had exactly the same problem. It turned out I didn't have a database associated with the app. You will see this with the simple heroku config command-- you should see some database URLs there pointing to Amazon. eg:
$ h config
DATABASE_URL => postgres://fakedexgwa:fakepassword#ec2-33-44-55-77.compute-1.amazonaws.com/fakedexgwa
Anyway, I fixed this by creating a brand new app and deploying to it. I tried fiddling around in the config screens, but couldn't fix the problem.
I'm not sure if this is the same cause as yours: I created a simple Ruby app, deployed it, and then created a Rails app. I hadn't gotten to any database yet, and I'm wondering if Heroku somehow decided on the first deployment that I didn't need a database.
First thing I'd start with is moving your application to the Cedar Stack - it supports Rails 3.1 out of the box without having to do any messing around.
When you create your app via heroku create do it as
heroku create --stack cedar
and then repush to this stack - you may find your problems will all vanish. The thing to remember is to add 'run' into your commands, heroku run console, heroku run rake db:migrate etc.
Another way of setting DATABASE_URL in the config file is to run the command
heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
The .._COLOR_URL would be taken from running heroku config as suggested by rodrei
See the heroku documentation:
https://devcenter.heroku.com/articles/heroku-postgresql#establish-primary-db
Please read this article:
ClearDB MySQL Database
Commands:
heroku config
or if you use for one rails project multiple heroku projects
heroku config --app your_app_name
Add Database URL :
heroku config:set DATABASE_URL='mysql://adffdadf2341:adf4234#us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
If you use mysql2 gem must to replace mysql with mysql2
heroku config:set DATABASE_URL='mysql2://adffdadf2341:adf4234#us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
I hope those configurations can be used for PostgreSQL, NoSQL database or another database.
Can you please type heroku config --long --(app name). Please post results, especially DATABASE_URL.
Need more info. Also, definitely ensure you're on the cedar stack as mentioned above.