Heroku Aplication error with Google charts - ruby-on-rails

I've got Rails app with Google charts. Everything goes very well on localhost, but on Heroku doesn't. Here is a heroku log:
$ heroku logs
2013-03-16T13:37:16+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T13:37:16+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T13:47:42+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T13:47:43+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 35505`
2013-03-16T13:47:45+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T13:47:45+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T13:47:45+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T13:47:45+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T13:47:47+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T13:47:47+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T13:57:51+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T13:57:53+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 14631`
2013-03-16T13:57:57+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T13:57:57+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T13:57:57+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T13:57:57+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T13:57:58+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T13:57:58+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:07:55+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:07:58+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 40304`
2013-03-16T14:08:00+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:08:00+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:08:00+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:08:00+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:08:01+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T14:08:01+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:18:01+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:18:03+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 46534`
2013-03-16T14:18:05+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:18:05+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:18:05+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:18:05+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:18:07+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:18:07+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T14:28:11+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:28:12+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 12019`
2013-03-16T14:28:16+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:28:16+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:28:16+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:28:16+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:28:17+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T14:28:17+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:38:18+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:38:20+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 26652`
2013-03-16T14:38:22+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:38:22+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:38:22+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:38:22+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:38:23+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T14:38:23+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:48:53+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:48:55+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 22351`
2013-03-16T14:48:57+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:48:57+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:48:57+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:48:57+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:48:58+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T14:48:58+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:58:59+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T14:59:01+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 25792`
2013-03-16T14:59:04+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T14:59:04+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T14:59:04+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T14:59:04+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T14:59:06+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T14:59:06+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T15:09:13+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T15:09:14+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 37918`
2013-03-16T15:09:16+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T15:09:16+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T15:09:16+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T15:09:16+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T15:09:17+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T15:09:17+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-16T15:19:51+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 32881`
2013-03-16T15:19:54+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-16T15:19:54+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-16T15:19:54+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-16T15:19:54+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-16T15:19:55+00:00 heroku[web.1]: Process exited with status 1
2013-03-16T15:30:16+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-16T15:32:31+00:00 heroku[web.1]: State changed from starting to down
2013-03-21T19:57:52+00:00 heroku[web.1]: Unidling
2013-03-21T19:57:52+00:00 heroku[web.1]: State changed from down to starting
2013-03-21T19:57:54+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 20966`
2013-03-21T19:57:56+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-21T19:57:56+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-21T19:57:56+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-21T19:57:56+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-21T19:57:57+00:00 heroku[web.1]: Process exited with status 1
2013-03-21T19:57:57+00:00 heroku[web.1]: State changed from crashed to starting
2013-03-21T19:57:57+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-21T19:57:59+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 58819`
2013-03-21T19:58:01+00:00 app[web.1]: /app/config/boot.rb:2:in `require': no such file to load -- google_chart (LoadError)
2013-03-21T19:58:01+00:00 app[web.1]: from /app/config/boot.rb:2:in `<top (required)>'
2013-03-21T19:58:01+00:00 app[web.1]: from script/rails:5:in `require'
2013-03-21T19:58:01+00:00 app[web.1]: from script/rails:5:in `<main>'
2013-03-21T19:58:02+00:00 heroku[web.1]: Process exited with status 1
2013-03-21T19:58:02+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-21T19:58:04+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=cvut-project-manager.herokuapp.com fwd="5.102.48.3" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-21T19:58:06+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=cvut-project-manager.herokuapp.com fwd="5.102.48.3" dyno= queue= wait= connect= service= status=503 bytes=
I'm using gem "google_charts", "~> 1.2.0" and I've got
require 'google_chart'
in boot.rb.
In project controller:
.
.
#some minor logic
.
.
GoogleChart::PieChart.new('320x200', "Burndown pie chart",false) do |pc|
pc.data "Remain", #remain_points.to_i
pc.data "Done", #done_points.to_i
#chart = pc.to_url
end
respond_to do |format|
format.html # show.html.erb
format.json { render :json => #project }
end
end
boot.rb:
require 'rubygems'
require 'google_chart'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
And link to that gem is:
https://github.com/rudionrails/google_charts
Rails version 3.2.8 with Ruby 1.8.7
So, please, can you tell me, why this works on localhost but not on heroku? Thank you.

Finally, I used
gem "googlecharts"
which works pretty well.

Related

Heroku LocomotiveCMS site won't run in production - require': cannot load such file -- locomotive/wagon/standalone_server

I'm having a problem with my LocomotiveCMS site crashing whenever I deploy to Heroku. The site is quite old and had been working fine for several years, until I was forced to upgrade to a newer Heroku stack. This required upgrading Ruby and LCMS versions. My site runs fine locally but crashes on start up when deployed to Heroku with the following log messages:
2022-11-01T15:48:54.268743+00:00 heroku[web.1]: Starting process with command bundle exec rackup config.ru -p ${PORT:-5000}
2022-11-01T15:48:55.623656+00:00 app[web.1]: bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.7.0/bin/rackup)
2022-11-01T15:48:55.623933+00:00 app[web.1]: /app/config.ru:1:in require': cannot load such file -- locomotive/wagon/standalone_server (LoadError) 2022-11-01T15:48:55.623962+00:00 app[web.1]: from /app/config.ru:1:in block in '
2022-11-01T15:48:55.623964+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in eval' 2022-11-01T15:48:55.623973+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in new_from_string'
2022-11-01T15:48:55.623976+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:105:in load_file' 2022-11-01T15:48:55.623985+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:66:in parse_file'
2022-11-01T15:48:55.623987+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:349:in build_app_and_options_from_config' 2022-11-01T15:48:55.624007+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:249:in app'
2022-11-01T15:48:55.624009+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:422:in wrapped_app' 2022-11-01T15:48:55.624019+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:312:in block in start'
2022-11-01T15:48:55.624021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:379:in handle_profiling' 2022-11-01T15:48:55.624031+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:311:in start'
2022-11-01T15:48:55.624033+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:168:in start' 2022-11-01T15:48:55.624042+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/bin/rackup:5:in <top (required)>'
2022-11-01T15:48:55.624044+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/bin/rackup:23:in load' 2022-11-01T15:48:55.624054+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/bin/rackup:23:in <top (required)>'
2022-11-01T15:48:55.624056+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in load' 2022-11-01T15:48:55.624065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in kernel_load'
2022-11-01T15:48:55.624067+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:23:in run' 2022-11-01T15:48:55.624077+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:483:in exec'
2022-11-01T15:48:55.624079+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 2022-11-01T15:48:55.624088+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
2022-11-01T15:48:55.624090+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 2022-11-01T15:48:55.624099+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:31:in dispatch'
2022-11-01T15:48:55.624121+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 2022-11-01T15:48:55.624123+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:25:in start'
2022-11-01T15:48:55.624132+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/exe/bundle:48:in block in <top (required)>' 2022-11-01T15:48:55.624134+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/friendly_errors.rb:103:in with_friendly_errors'
2022-11-01T15:48:55.624143+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/exe/bundle:36:in <top (required)>' 2022-11-01T15:48:55.624145+00:00 app[web.1]: from /app/vendor/bundle/bin/bundle:113:in load'
2022-11-01T15:48:55.624155+00:00 app[web.1]: from /app/vendor/bundle/bin/bundle:113:in `'
2022-11-01T15:48:55.774101+00:00 heroku[web.1]: Process exited with status 1
2022-11-01T15:48:55.849654+00:00 heroku[web.1]: State changed from starting to crashed
I'm using Heroku-20 stack, Ruby 2.7.6 and gem locomotivecms_wagon 3.1.1
The site runs fine locally (using bundle exec wagon serve)
I've tried the Heroku-18 stack with the same result. I haven't been able to get the latest Heroku stack (22) to work as there is a Ruby version clash with LocomotiveCMS.
I tried using a Procfile (which I never needed before) - I used the standard puma Procfile as shown in the Heroku doc but couldn't get that to work either.
I've also tried deleting Gemfile.lock, running bundle install and bundle update, but no change.

Heroku rails installation stopped working after month

I set up this super simple rails app about 5 month ago and it worked until lately.
But today i noticed im getting this error: "We're sorry, but something went wrong. If you are the application owner check the logs for more information."
I checked the heroku logs but i dont see any errors appart from what i assume is the daily restart:
2017-02-11T01:37:52.624288+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=url.herokuapp.com request_id=918be0b7-bf45-4111-97b8-d95450dd3507 fwd="126.7.114.122" dyno=web.1 connect=0ms service=4ms status=200 bytes=228
2017-02-11T01:38:45.926088+00:00 heroku[web.1]: Restarting
2017-02-11T01:38:45.927276+00:00 heroku[web.1]: State changed from up to starting
2017-02-11T01:38:46.437082+00:00 app[web.1]: [2017-02-11 01:38:46] FATAL SignalException: SIGTERM
2017-02-11T01:38:46.437099+00:00 app[web.1]: /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `select'
2017-02-11T01:38:46.437100+00:00 app[web.1]: /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:174:in `block in start'
2017-02-11T01:38:46.437101+00:00 app[web.1]: /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:32:in `start'
2017-02-11T01:38:46.437102+00:00 app[web.1]: /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/webrick/server.rb:162:in `start'
2017-02-11T01:38:46.437103+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:34:in `run'
2017-02-11T01:38:46.437103+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
2017-02-11T01:38:46.437104+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
2017-02-11T01:38:46.437105+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2017-02-11T01:38:46.437105+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
2017-02-11T01:38:46.437106+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
2017-02-11T01:38:46.437106+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2017-02-11T01:38:46.437107+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
2017-02-11T01:38:46.437108+00:00 app[web.1]: bin/rails:9:in `require'
2017-02-11T01:38:46.437109+00:00 app[web.1]: bin/rails:9:in `<main>'
2017-02-11T01:38:46.437176+00:00 app[web.1]: [2017-02-11 01:38:46] INFO going to shutdown ...
2017-02-11T01:38:46.437226+00:00 app[web.1]: [2017-02-11 01:38:46] INFO WEBrick::HTTPServer#start done.
I also took a look at my production.log file but it's weirdly empty.
I'm at a loss regarding how to trouble shoot this. any suggestion?
So, it turned out it wasnt actually related to the environment.
I ran the site on my machine with the prod env and was able to find an access_token was expired which error wasnt caught correctly causing the 500 error.
I fixed it and redeployed the site. it works now.

Trouble with Rails Unicorn Web Server starting on Heroku

I've been trouble-shooting my crashed application on Heroku without success. I'm using:
Ruby 2.1.0
Rails 4.1.6
Unicorn web server
I'm getting an Application Error when I go to my url.
These are the last few lines from heroku logs
2015-03-13T20:44:36.095469+00:00 app[web.1]: from config.ru:1:in `new'
2015-03-13T20:44:36.095481+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
2015-03-13T20:44:36.095477+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn- 4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
2015-03-13T20:44:36.095483+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>'
2015-03-13T20:44:36.095470+00:00 app[web.1]: from config.ru:1:in `<main>'
2015-03-13T20:44:36.095471+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
2015-03-13T20:44:36.095467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2015-03-13T20:44:36.095473+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
2015-03-13T20:44:36.095474+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
2015-03-13T20:44:36.095479+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start'
2015-03-13T20:44:36.095480+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
2015-03-13T20:44:36.912915+00:00 heroku[web.1]: Process exited with status 1
2015-03-13T20:44:37.040788+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-13T20:45:09.859594+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=stand-as-witnesses-staging.herokuapp.com request_id=2228b811-6b37-482e-a1ec-630699947581 fwd="71.232.132.204" dyno= connect= service= status=503 bytes=
Heroku ps gives:
=== web (1X): `bundle exec unicorn -p $PORT -c ./config/unicorn.rb`
web.1: crashed 2015/03/13 16:44:37 (~ 19m ago)
I upgraded from Ruby 2.0.0 to 2.1.0 and from Unicorn 4.6.3 to 4.8.3 to see if that would solve the problem, but no help there.
My Procfile and app/config/unicorn.rb files are standard based on Heroku's instructions for using unicorn.
Since the app runs fine locally, can anyone point out why I'm getting this crash?
Thanks!
Seems like you should specify model class instead (as I understand this is BlockedSite) of controller in your app/admin/blocked_site.rb AA file. This should fix error:
superclass mismatch for class BlockedSitesController (TypeError)
Thanks for pointing me in the right direction. It turns out that the problem was that we had an existing file in app/controllers/admin/blocked_sites_controller.rb. When I removed that file and a couple of others in that same location, the crashes went away and I was able to navigate to my pages.

heroku looking for a staging.log file?

Our heroku staging app is crashing on start up due to not being able to find a staging.log . This seems pretty odd since it should just be outputting everything to development.log, so I am not exactly sure what is going on.
Any help would be greatly appreciated! Thanks!
Here is the stack trace:
2012-04-18T19:20:36+00:00 heroku[web.1]: State changed from crashed to created
2012-04-18T19:20:36+00:00 heroku[web.1]: State changed from created to starting
2012-04-18T19:20:37+00:00 heroku[slugc]: Slug compilation finished
2012-04-18T19:20:40+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 49887`
2012-04-18T19:20:46+00:00 app[web.1]: => Booting WEBrick
2012-04-18T19:20:46+00:00 app[web.1]: => Rails 3.0.3 application starting in staging on http://0.0.0.0:49887
2012-04-18T19:20:46+00:00 app[web.1]: => Call with -d to detach
2012-04-18T19:20:46+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-04-18T19:20:46+00:00 app[web.1]: Exiting
2012-04-18T19:20:46+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/rack/log_tailer.rb:8:in `size': No such file or directory - log/staging.log (Errno::ENOENT)
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/rack/log_tailer.rb:8:in `initialize'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:247:in `new'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:247:in `block in build_app'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:243:in `reverse_each'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:243:in `build_app'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:253:in `wrapped_app'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.2.5/lib/rack/server.rb:204:in `start'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands/server.rb:65:in `start'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:30:in `block in <top (required)>'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'
2012-04-18T19:20:46+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `<top (required)>'
2012-04-18T19:20:46+00:00 app[web.1]: from script/rails:6:in `require'
2012-04-18T19:20:46+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-04-18T19:20:47+00:00 heroku[web.1]: Process exited with status 1
2012-04-18T19:20:47+00:00 heroku[web.1]: State changed from starting to crashed
Your app should be outputting its logs to STDOUT, not to a file on the server. See the logging article on the Dev Center for details: https://devcenter.heroku.com/articles/logging
Heroku automatically injects the rails_log_stdout to your app on deploy which fixes Rails default logging, so I'm not sure why that isn't happening here. Do you see the following lines output when you deploy to Heroku?
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
If you have a config/environments/staging.rb file ensure that you've set both your RACK_ENV and RAILS_ENV to 'staging'.
heroku config:add RACK_ENV=staging --app myapp-staging
heroku config:add RAILS_ENV=staging --app myapp-staging
Do you have a Procfile that specifies which environement you want to run? I don't believe this is required by Heroku, but it allows you to specify the enviornment, among other things.

Deploying an application to Heroku and getting "no such file to load -- will_paginate"

I am running a Ruby 1.8.6, Rails 1.2 application on Heroku. I am using the Aspen stack. When I attempt to deploy, the app crashes.
Here is what I have in the log
2012-03-13T08:43:44-07:00 heroku[slugc]: Slug compilation started
2012-03-13T15:43:49+00:00 heroku[api]: Release v4 created by sunny.lanke#gmail.com
2012-03-13T15:43:49+00:00 heroku[api]: Deploy 5c774a1 by sunny.lanke#gmail.com
2012-03-13T15:43:50+00:00 heroku[web.1]: State changed from created to starting
2012-03-13T08:43:50-07:00 heroku[slugc]: Slug compilation finished
2012-03-13T15:43:52+00:00 heroku[web.1]: Starting process with command `thin -p 14350 -e production -R /home/heroku_rack/heroku.ru start`
2012-03-13T15:43:55+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- will_paginate (MissingSourceFile)
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2012-03-13T15:43:55+00:00 app[web.1]: from /app/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
3:55+00:00 app[web.1]: from /app/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:343:in `new_constants_in'
2012-03-13T15:43:55+00:00 app[web.1]: from /app/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
2012-03-13T15:43:55+00:00 app[web.1]: from /app/config/environment.rb:73
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems /custom_require.rb:31:in `gem_original_require'
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/rails.rb:31:in `load_application'
2012-03-13T15:43:55+00:00 app[web.1]: ... 12 levels...
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2012-03-13T15:43:55+00:00 app[web.1]: from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2012-03-13T15:43:55+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
2012-03-13T15:43:55+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1
2012-03-13T15:43:56+00:00 heroku[web.1]: Process exited with status 1
2012-03-13T15:43:56+00:00 heroku[web.1]: State changed from starting to crashed
2012-03-13T15:43:56+00:00 heroku[web.1]: State changed from crashed to created
2012-03-13T15:43:56+00:00 heroku[web.1]: State changed from created to starting
2012-03-13T15:43:59+00:00 heroku[web.1]: Starting process with command `thin -p 54230 -e production -R /home/heroku_rack/heroku.ru start` `
EDIT: As per the suggestion, I have asked Heroku support to install the gem will_paginate. I will keep you guys posted about the result.
You're missing the will_paginate gem.
If will_paginate even supports 1.8.6 you need to add it your .gems manifest. If you're using Bundler, add it to your Gemfile and bundle before deploying.
http://devcenter.heroku.com/articles/gems

Resources