Heroku Application Error - ruby-on-rails-3

Application Error
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.
$ heroku logs
2012-05-22T17:59:46+00:00 app[web.1]: => Call with -d to detach
2012-05-22T17:59:46+00:00 app[web.1]: Exiting
2012-05-22T17:59:46+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:313:in `depend_on'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-05-22T17:59:46+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-05-22T17:59:46+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-05-22T17:59:46+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-05-22T17:59:46+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-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-05-22T17:59:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-05-22T17:59:46+00:00 app[web.1]: from script/rails:6:in `require'
2012-05-22T17:59:46+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-05-22T17:59:47+00:00 heroku[web.1]: Process exited with status
2012-05-22T17:59:47+00:00 heroku[web.1]: State changed from starting to crashed
2012-05-22T18:11:00+00:00 heroku[web.1]: State changed from crashed to created
2012-05-22T18:11:00+00:00 heroku[web.1]: State changed from created to starting
2012-05-22T18:11:03+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 47802`
2012-05-22T18:11:07+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/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-22T18:11:07+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/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-05-22T18:11:11+00:00 app[web.1]: => Booting WEBrick
2012-05-22T18:11:11+00:00 app[web.1]: => Rails 3.2.1 application starting in production on http://0.0.0.0:47802
2012-05-22T18:11:11+00:00 app[web.1]: => Call with -d to detach
2012-05-22T18:11:11+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-05-22T18:11:11+00:00 app[web.1]: Exiting
2012-05-22T18:11:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:359:in `require_or_load'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:313:in `depend_on'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
2012-05-22T18:11:11+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-05-22T18:11:11+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-05-22T18:11:11+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-05-22T18:11:11+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-05-22T18:11:11+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-05-22T18:11:11+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-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
2012-05-22T18:11:11+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-05-22T18:11:11+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-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-05-22T18:11:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-05-22T18:11:11+00:00 app[web.1]: from script/rails:6:in `require'
2012-05-22T18:11:11+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-05-22T18:11:13+00:00 heroku[web.1]: Process exited with status 1
2012-05-22T18:11:13+00:00 heroku[web.1]: State changed from starting to crashed
Based on what I've read: Application Error in heroku
Application Error on heroku
Rails Heroku application error
There has been no resolution to this issue, except some vague recommendations concerning the pg gem and postgres.
I have pg only in production in my gemfile and sqlite3 for development:
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.5'
group :production do
gem 'pg', '0.12.2'
end
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'taps'
gem 'annotate', '~> 2.4.1.beta'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.0'
group :test, :development do
gem 'rspec-rails', '~> 2.8.rc'
gem 'guard-rspec', '0.5.5'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.0'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '1.4.0'
gem 'cucumber-rails', '1.2.1'
gem 'database_cleaner', '0.7.0'
end
#Nifty Scaffold
gem 'nifty-generators', :group => :development
# Location - Geocoder
gem 'geocoder'
gem "mocha", :group => :test
Nevertheless, the application still crashes (according to the logs) and gives an application error when rendering the site. Everything functions fine on the local server, so it's definitely a deployment issue. Does anyone have any idea what's going wrong?
Thanks

/app/app/controllers/comments_controller.rb:15: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
There is your error. Re-read your comments controller, there is a clear syntax error in the file.

Related

unicorn fails to start

I am trying to start a unicorn server. It was working fine before. Suddenly after a server restart, this error popped.
I, [2014-05-25T17:04:20.480271 #13922] INFO -- : Refreshing Gem list
/home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require': No such file to load -- Token (LoadError)
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/releases/20140525165531/app/controllers/domains_controller.rb:1:in `<top (required)>'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:307:in `depend_on'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:225:in `require_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:467:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:467:in `block in eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:465:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:465:in `eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:346:in `eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'**strong text**
Silly one. I had a require 'Token' in one of my files.

Unable to boot rails server using mysql2

Here is the error...
C:\Sites\simple_cms>rails s
> => Booting WEBrick
> => Rails 3.2.13 application starting in development on http://X.X.X.X:3000
> => Call with -d to detach
> => Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integ
ration.rb:214:in `block in replace_gem': Please install the mysql2 adapter: `gem
install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it
to Gemfile.) (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:50:in `resol
ve_hash_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:41:in `resol
ve_string_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:130:in `esta
blish_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/base.rb:720:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:88:in `block in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/a
pplication.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/r
ailtie/configurable.rb:30:in `method_missing'
from C:/Sites/simple_cms/config/environment.rb:5:in `<top (required)>'
from C:/Sites/simple_cms/config.ru:3:in `require'
from C:/Sites/simple_cms/config.ru:3:in `block in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `initialize'
from C:/Sites/simple_cms/config.ru:in `new'
from C:/Sites/simple_cms/config.ru:in `<main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any help will be appreciated as I have followed all other threads with no joy. Thanks in advance
you have to read the error message carefully, it's in there ;)
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError)
just add gem 'mysql2' to your Gemfile, and run bundle install.

`method_missing': undefined method `user_class=' for #<Forem::Engine:0x9de6bc0>

When i run rails server,i encountered this error.
'bundle install' has been success.My RVM use ruby 1.9.3 and rails 3.2 but the project need rails 3.1.I think the bundle has already solved the because of the bundle.The rails and ruby might not be the reason.
Anything would be help.Thanks
Your bundle is complete!
It was installed into ./vendor/bundle
magic#magic-ThinkPad-T430u:~/Documents/rails/ticketee-book$ rails server
=> Booting WEBrick
=> Rails 3.1.0.rc2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/railtie/configurable.rb:30:in `method_missing': undefined method `user_class=' for #<Forem::Engine:0x9de6bc0> (NoMethodError)
from /home/magic/Documents/rails/ticketee-book/config/initializers/forem.rb:1:in `<top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `block in load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:641:in `new_constants_in'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:544:in `block (2 levels) in <class:Engine>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:543:in `each'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:543:in `block in <class:Engine>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:25:in `instance_exec'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:25:in `run'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:50:in `block in run_initializers'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:49:in `each'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:49:in `run_initializers'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/application.rb:96:in `initialize!'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/magic/Documents/rails/ticketee-book/config/environment.rb:5:in `<top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `require'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `block in require'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:641:in `new_constants_in'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `require'
from /home/magic/Documents/rails/ticketee-book/config.ru:4:in `block in <main>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:51:in `instance_eval'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:51:in `initialize'
from /home/magic/Documents/rails/ticketee-book/config.ru:1:in `new'
from /home/magic/Documents/rails/ticketee-book/config.ru:1:in `<main>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:40:in `eval'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:40:in `parse_file'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:200:in `app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands/server.rb:46:in `app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:301:in `wrapped_app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:252:in `start'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands/server.rb:70:in `start'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:54:in `block in <top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:49:in `tap'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Try running server with bundle command. It will use all gems that are defined in your Gemfile then:
bundle exec rails server

After push to Heroku giv error "We're sorry, but something went wrong."

I'm running on rails 3.2.1. I get the following message on deployed app: We're sorry, but something went wrong.
I really don't have any idea what could cause this mistake.
This is are my heroku logs.
Invalid gemspec in [C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specificatio
ns/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
2013-02-01T12:53:55+00:00 app[web.1]: [2013-02-01 12:53:55] INFO WEBrick::HTTPS
erver#start: pid=2 port=47478
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3328337976595330500__cal
l__2238187366165653971__callbacks'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/methodoverride.rb:21:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/runtime.rb:17:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/lock.rb:15:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/content_length.rb:14:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2013-02-01T12:53:58+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/handler/webrick.rb:59:in `service'
2013-02-01T12:53:58+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-02-01T12:53:58+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-02-01T12:53:58+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]:
2013-02-01T12:53:58+00:00 app[web.1]: cache: [GET /pages/home] miss
2013-02-01T12:53:58+00:00 heroku[router]: at=info method=GET path=/pages/home ho
st=evening-caverns-5777.herokuapp.com fwd=82.207.20.180 dyno=web.1 queue=0 wait=
0ms connect=4ms service=519ms status=500 bytes=643
2013-02-01T12:53:47+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-02-01T12:53:48+00:00 app[web.1]: [2013-02-01 12:53:48] ERROR SignalExceptio
n: SIGTERM
2013-02-01T12:53:48+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-02-01T12:53:58+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-02-01T12:54:00+00:00 heroku[web.1]: Process exited with status 137
2013-02-01T12:53:58+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-02-01T12:57:46+00:00 heroku[api]: Starting process with command `bundle exe
c rake db:reset` by marik.expert#gmail.com
2013-02-01T12:57:59+00:00 heroku[run.1710]: State changed from up to complete
2013-02-01T12:57:58+00:00 heroku[run.1710]: Client connection closed. Sending SI
GHUP to all processes
2013-02-01T12:57:52+00:00 heroku[run.1710]: Awaiting client
2013-02-01T12:57:52+00:00 heroku[run.1710]: Starting process with command `bundl
e exec rake db:reset`
2013-02-01T12:57:59+00:00 heroku[run.1710]: Process exited with status 1
2013-02-01T12:57:53+00:00 heroku[run.1710]: State changed from starting to up
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: Started GET "/pages/home" for 82.207.20.18
0 at 2013-02-01 13:00:50 +0000
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/runtime.rb:17:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/methodoverride.rb:21:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3328337976595330500__cal
l__2238187366165653971__callbacks'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/lock.rb:15:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2013-02-01T13:00:50+00:00 heroku[router]: at=info method=GET path=/pages/home ho
st=evening-caverns-5777.herokuapp.com fwd=82.207.20.180 dyno=web.1 queue=0 wait=
0ms connect=3ms service=8ms status=500 bytes=643
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/content_length.rb:14:in `call'
2013-02-01T13:00:50+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-02-01T13:00:50+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.4
/lib/rack/handler/webrick.rb:59:in `service'
2013-02-01T13:00:50+00:00 app[web.1]:
2013-02-01T13:00:50+00:00 app[web.1]: cache: [GET /pages/home] miss
My Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3', :group => :development
group :development do
gem 'rspec-rails', '2.6.1'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtim
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
how to solve the problem?
Well, one thing, there is no db adapter being passed to Heroku. Make sure you heroku app has a DB, a
Your application is expecting a database connection, but you are not specifying an appropriate adapter. If you are using Heroku Postgres, you need to add something like gem 'pg', :group => :production and make sure you have a DATABASE_URL in your Heroku configs.
You need add pg gem in your production environment in Gemfile.
group :production
gem 'pg'
end
And then run
heroku rake db:migrate #create db tables for production
git push heroku master #pushed the latest changes to production
heroku restart # it will start the server again with new changes
It should work now.

Where do I put Sinatra files intended to be embedded in a Rails3 app?

I want to use the new Rails3 feature that allows you to embed a Sinatra app inside rails.
In my routes file, I have:
# app names changed to protect the (not so) innocent
MyApp::Application.routes.draw do
match "/service", :to => MyService
...
end
And in /lib/my_service.rb I have
class MyService < Sinatra::Base
get "/" do
"Hello World"
end
end
When I try to start the Rails server I get Uninitialized constant MyService (NameError), which I suspect means my Sinatra file is in the wrong directory. Where am I supposed to put it?
Full error text:
rails/my_app ยป rails server
=> Booting WEBrick
=> Rails 3.0.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/marshallyount/Projects/clients/method/rails/my_app/config/routes.rb:2:in `block in <top (required)>': uninitialized constant MyService (NameError)
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:233:in `instance_exec'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/routing/route_set.rb:233:in `draw'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config/routes.rb:1:in `<top (required)>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:127:in `block in reload_routes!'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:127:in `each'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:127:in `reload_routes!'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:120:in `block in routes_reloader'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/activesupport-3.0.1/lib/active_support/file_update_checker.rb:32:in `call'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/activesupport-3.0.1/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/railtie.rb:14:in `block (2 levels) in <class:Railtie>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/activesupport-3.0.1/lib/active_support/callbacks.rb:419:in `_run_prepare_callbacks'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/callbacks.rb:40:in `initialize'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:33:in `new'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:33:in `build'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:79:in `block in build'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:79:in `each'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:79:in `inject'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/actionpack-3.0.1/lib/action_dispatch/middleware/stack.rb:79:in `build'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:162:in `app'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application/finisher.rb:35:in `block in <module:Finisher>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `run'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/initializable.rb:50:in `block in run_initializers'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `each'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:134:in `initialize!'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/application.rb:77:in `method_missing'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config/environment.rb:5:in `<top (required)>'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config.ru:3:in `require'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config.ru:3:in `block in <main>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config.ru:1:in `new'
from /Users/marshallyount/Projects/clients/method/rails/my_app/config.ru:1:in `<main>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/builder.rb:35:in `eval'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/builder.rb:35:in `parse_file'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/server.rb:162:in `app'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/server.rb:248:in `wrapped_app'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/rack-1.2.1/lib/rack/server.rb:213:in `start'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/commands/server.rb:65:in `start'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/commands.rb:30:in `block in <top (required)>'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/commands.rb:27:in `tap'
from /Users/marshallyount/.rvm/gems/ruby-1.9.2-p0#my_app/gems/railties-3.0.1/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I found a good answer for this question, thanks to this article.
I was missing the all important requires header at the top of my routes file:
require 'my_service.rb'
# app names changed to protect the (not so) innocent
MyApp::Application.routes.draw do
match "/service", :to => MyService
...
end