Heroku, Rails 3.1 and Dalli - ruby-on-rails-3

Having problems with some asset caching, using Dalli on Heroku with Rails 3.1. These are the errors in my logs:
2011-09-12T16:37:52+00:00 app[web.1]: Started GET "/assets/bg.png" for 68.33.34.109 at 2011-09-12 16:37:52 +0000
2011-09-12T16:37:52+00:00 app[web.1]: cache: [GET /assets/bg.png] miss, store
2011-09-12T16:37:52+00:00 app[web.1]: !! Rack application returned nil body. Probably you wanted it to be an empty string?
2011-09-12T16:37:52+00:00 app[web.1]: !! Unexpected error while processing request: undefined method `each' for nil:NilClass
2011-09-12T16:37:52+00:00 app[web.1]: cache: [GET /assets/screenshots/2-76481ad827eb34e33208c68196c57401.png] miss
2011-09-12T16:37:52+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET countr.boxfirepress.com/assets/bg.png dyno=web.1 queue= wait= service= status=503 bytes=
2011-09-12T16:37:52+00:00 heroku[router]: GET countr.boxfirepress.com/assets/screenshots/2-76481ad827eb34e33208c68196c57401.png dyno=web.1 queue=0 wait=0ms service=5ms status=200 bytes=48355
2011-09-12T16:37:52+00:00 app[web.1]: cache: [GET /assets/screenshots/3-4fd3fe37a5915dec391663720fcbb7d4.png] miss
2011-09-12T16:37:52+00:00 heroku[router]: GET countr.boxfirepress.com/assets/screenshots/3-4fd3fe37a5915dec391663720fcbb7d4.png dyno=web.1 queue=0 wait=0ms service=8ms status=200 bytes=26464
And, in the console:
irb(main):001:0> Rails.cache.clear
localhost:11211 failed (count: 0)
Dalli::NetworkError: localhost:11211 is down:
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/server.rb:43:in `request'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/options.rb:18:in `block in request'
from /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/options.rb:17:in `request'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/client.rb:159:in `block in flush'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/client.rb:159:in `map'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/dalli/client.rb:159:in `flush'
from /app/vendor/bundle/ruby/1.9.1/gems/dalli-1.0.5/lib/active_support/cache/dalli_store.rb:103:in `clear'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.0/lib/active_support/cache/strategy/local_cache.rb:88:in `clear'
from (irb):1
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any thoughts about what's going on?

It looks like Dalli is not connection to a Memcache server? Have you enabled the Heroku Memcache addon (or otherwise configured a Memcache server)?

Related

SOS:: Hosted Google Reader Alternative project down on Heroku with timeout H12.

We have built an open-source, free Google Reader Alternative and have live users using the platform. It is hosted at http://reader.pykih.com and code is at http://github.com/pykih/reader
Until, last night my app was working fine and today morning it is down due to timeout.
We use DelayedJobs for all feed imports
This timeout is occurring on the homepage where there is no external service call, emails being set, etc. except may be push to GA
Heroku Support (as per them) is asleep right now and we will get an answer only on Monday. :-(
We went through a lot of past questions on Stack over flow about this issue but none seem to answer our issue.
Can someone please advice?
2013-06-08T04:25:32.596864+00:00 app[worker.1]: [Worker(host:b0f05380-0265-49de-b2c1-df13df269cd6 pid:2)] Starting job worker
2013-06-08T04:25:34.225938+00:00 app[web.1]: Disconnected from ActiveRecord
2013-06-08T04:25:34.225544+00:00 app[web.1]: I, [2013-06-08T04:25:34.225214 #2] INFO -- : listening on addr=0.0.0.0:33707 fd=7
2013-06-08T04:25:34.250988+00:00 heroku[web.1]: State changed from starting to up
2013-06-08T04:25:35.246195+00:00 app[web.1]: Disconnected from ActiveRecord
2013-06-08T04:25:35.254585+00:00 app[web.1]: Connected to ActiveRecord
2013-06-08T04:25:35.375559+00:00 app[web.1]: I, [2013-06-08T04:25:35.375194 #5] INFO -- : worker=0 ready
2013-06-08T04:25:36.263576+00:00 app[web.1]: Disconnected from ActiveRecord
2013-06-08T04:25:36.273848+00:00 app[web.1]: Connected to ActiveRecord
2013-06-08T04:25:36.390283+00:00 app[web.1]: I, [2013-06-08T04:25:36.389861 #8] INFO -- : worker=1 ready
2013-06-08T04:25:37.281171+00:00 app[web.1]: I, [2013-06-08T04:25:37.280925 #2] INFO -- : master process ready
2013-06-08T04:25:37.291365+00:00 app[web.1]: Connected to ActiveRecord
2013-06-08T04:25:37.416442+00:00 app[web.1]: I, [2013-06-08T04:25:37.415844 #11] INFO -- : worker=2 ready
2013-06-08T04:25:46.993985+00:00 app[web.1]: Started GET "/" for 120.63.8.230 at 2013-06-08 04:25:46 +0000
2013-06-08T04:26:16.919340+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=reader.pykih.com fwd="120.63.8.230" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2013-06-08T04:26:23.974357+00:00 app[web.1]: E, [2013-06-08T04:26:17.347459 #2] ERROR -- : worker=0 PID:5 timeout (31s > 30s), killing
2013-06-08T04:26:23.975290+00:00 app[web.1]: E, [2013-06-08T04:26:17.376903 #2] ERROR -- : reaped #<Process::Status: pid 5 SIGKILL (signal 9)> worker=0
2013-06-08T04:26:23.975290+00:00 app[web.1]: Disconnected from ActiveRecord
2013-06-08T04:26:23.975611+00:00 app[web.1]: Connected to ActiveRecord
2013-06-08T04:26:23.975611+00:00 app[web.1]: I, [2013-06-08T04:26:18.524590 #14] INFO -- : worker=0 ready
Heroku fixed itself 11 hours later. V annoying.

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.

Heroku Application Error

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.

500 internal server error when I try to push my app onto Heroku

I am facing this problem upon pushing my app to Heroku:
500 internal server error
ActionView::Template::Error...application.css isn't precompiled (see attached Heroku logs)
Also, ActionController::RoutingError (No route matches [GET] "/assets/rails.png"
I am using Twitter Bootstrap 2.0.1 and Rails 3.1.1 (see Gemfile below)
Any guidance would be much appreciated!
HEROKU LOGS
2012-04-06T16:49:38+00:00 app[web.1]:
2012-04-06T16:49:38+00:00 app[web.1]: Started GET "/" for 115.186.162.46 at 2012-04-06 09:49:38 -0700
2012-04-06T16:49:38+00:00 app[web.1]: Processing by PostsController#new as HTML
2012-04-06T16:49:38+00:00 app[web.1]: Rendered posts/_form.html.erb (1.4ms)
2012-04-06T16:49:38+00:00 app[web.1]: Rendered posts/new.html.erb within layouts/application (1.8ms)
2012-04-06T16:49:38+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms
2012-04-06T16:49:38+00:00 app[web.1]:
2012-04-06T16:49:38+00:00 app[web.1]: ActionView::Template::Error (application.css isn't precompiled):
2012-04-06T16:49:38+00:00 app[web.1]: 6: <title>Weddoo!</title>
2012-04-06T16:49:38+00:00 app[web.1]: 7: <%= csrf_meta_tags %>
2012-04-06T16:49:38+00:00 app[web.1]: 8:
2012-04-06T16:49:38+00:00 app[web.1]: 9: <%= stylesheet_link_tag "application", :media => "all" %>
2012-04-06T16:49:38+00:00 app[web.1]: 10:
2012-04-06T16:49:38+00:00 app[web.1]: 11: <link href="images/favicon.ico" rel="shortcut icon">
2012-04-06T16:49:38+00:00 app[web.1]: 12: <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
2012-04-06T16:49:38+00:00 app[web.1]: app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__819333137240276330_18641900'
2012-04-06T16:49:38+00:00 app[web.1]: app/controllers/posts_controller.rb:24:in `new'
2012-04-06T16:49:38+00:00 app[web.1]:
2012-04-06T16:49:38+00:00 app[web.1]:
2012-04-06T16:49:38+00:00 app[web.1]: cache: [GET /] miss
2012-04-06T16:49:38+00:00 heroku[router]: GET weddoo.heroku.com/ dyno=web.1 queue=0 wait=0ms service=11ms status=500 bytes=728
2012-04-06T16:49:38+00:00 heroku[nginx]: 115.186.162.46 - - [06/Apr/2012:16:49:38 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" weddoo.heroku.com
2012-04-06T16:49:39+00:00 app[web.1]:
2012-04-06T16:49:39+00:00 app[web.1]:
2012-04-06T16:49:39+00:00 app[web.1]: Started GET "/" for 115.186.162.46 at 2012-04-06 09:49:39 -0700
2012-04-06T16:49:39+00:00 app[web.1]: Processing by PostsController#new as HTML
2012-04-06T16:49:39+00:00 app[web.1]: Rendered posts/new.html.erb within layouts/application (1.6ms)
2012-04-06T16:49:39+00:00 app[web.1]: Rendered posts/_form.html.erb (1.4ms)
2012-04-06T16:49:39+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms
2012-04-06T16:49:39+00:00 app[web.1]:
2012-04-06T16:49:39+00:00 app[web.1]: ActionView::Template::Error (application.css isn't precompiled):
2012-04-06T16:49:39+00:00 app[web.1]: 6: <title>Weddoo!</title>
2012-04-06T16:49:39+00:00 app[web.1]: 9: <%= stylesheet_link_tag "application", :media => "all" %>
2012-04-06T16:49:39+00:00 app[web.1]: 10:
2012-04-06T16:49:39+00:00 app[web.1]: 11: <link href="images/favicon.ico" rel="shortcut icon">
2012-04-06T16:49:39+00:00 app[web.1]: 7: <%= csrf_meta_tags %>
2012-04-06T16:49:39+00:00 app[web.1]: 8:
2012-04-06T16:49:39+00:00 app[web.1]: 12: <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
2012-04-06T16:49:39+00:00 app[web.1]: app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__819333137240276330_18641900'
2012-04-06T16:49:39+00:00 app[web.1]: app/controllers/posts_controller.rb:24:in `new'
2012-04-06T16:49:39+00:00 app[web.1]:
2012-04-06T16:49:39+00:00 app[web.1]:
2012-04-06T16:49:39+00:00 app[web.1]: cache: [GET /] miss
2012-04-06T16:49:39+00:00 heroku[router]: GET weddoo.heroku.com/ dyno=web.1 queue=0 wait=0ms service=10ms status=500 bytes=728
2012-04-06T16:49:39+00:00 heroku[nginx]: 115.186.162.46 - - [06/Apr/2012:16:49:39 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" weddoo.heroku.com
2012-04-06T16:51:32+00:00 heroku[slugc]: Slug compilation started
2012-04-06T16:51:46+00:00 heroku[api]: Release v8 created by postkhalid#yahoo.com
2012-04-06T16:51:46+00:00 heroku[api]: Deploy db6820d by postkhalid#yahoo.com
2012-04-06T16:51:46+00:00 heroku[web.1]: State changed from up to bouncing
2012-04-06T16:51:46+00:00 heroku[web.1]: State changed from bouncing to created
2012-04-06T16:51:46+00:00 heroku[web.1]: State changed from created to starting
2012-04-06T16:51:47+00:00 heroku[slugc]: Slug compilation finished
2012-04-06T16:51:48+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-04-06T16:51:48+00:00 app[web.1]: >> Stopping ...
2012-04-06T16:51:50+00:00 heroku[web.1]: Process exited with status 0
2012-04-06T16:51:51+00:00 heroku[web.1]: Starting process with command `thin -p 30481 -e production -R /home/heroku_rack/heroku.ru start`
2012-04-06T16:51:55+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-04-06T16:51:55+00:00 app[web.1]: >> Maximum connections set to 1024
2012-04-06T16:51:55+00:00 app[web.1]: >> Listening on 0.0.0.0:30481, CTRL+C to stop
2012-04-06T16:51:56+00:00 heroku[web.1]: State changed from starting to up
2012-04-06T16:51:56+00:00 heroku[rake.1]: State changed from created to starting
2012-04-06T16:52:02+00:00 app[rake.1]: Awaiting client
2012-04-06T16:52:02+00:00 heroku[rake.1]: State changed from starting to up
2012-04-06T16:52:02+00:00 app[rake.1]: Starting process with command `bundle exec rake db:migrate`
2012-04-06T16:52:07+00:00 heroku[rake.1]: Process exited with status 0
2012-04-06T16:52:07+00:00 heroku[rake.1]: State changed from up to complete
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]: Started GET "/assets/rails.png" for 115.186.162.46 at 2012-04-06 09:52:20 -0700
2012-04-06T16:52:20+00:00 heroku[router]: GET weddoo.heroku.com/assets/rails.png dyno=web.1 queue=0 wait=0ms service=80ms status=404 bytes=728
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/rails.png"):
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]:
2012-04-06T16:52:20+00:00 app[web.1]: cache: [GET /assets/rails.png] miss
2012-04-06T16:52:21+00:00 heroku[nginx]: 115.186.162.46 - - [06/Apr/2012:16:52:21 +0000] "GET /assets/rails.png HTTP/1.1" 404 728 "http://weddoo.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" weddoo.heroku.com
2012-04-06T16:52:23+00:00 app[web.1]:
2012-04-06T16:52:23+00:00 app[web.1]:
2012-04-06T16:52:23+00:00 app[web.1]: Started GET "/" for 115.186.162.46 at 2012-04-06 09:52:23 -0700
2012-04-06T16:52:23+00:00 app[web.1]: Processing by PostsController#new as HTML
2012-04-06T16:52:23+00:00 app[web.1]: Rendered posts/_form.html.erb (25.6ms)
2012-04-06T16:52:23+00:00 app[web.1]: Rendered posts/new.html.erb within layouts/application (53.8ms)
2012-04-06T16:52:23+00:00 app[web.1]: ActionView::Template::Error (application.css isn't precompiled):
2012-04-06T16:52:23+00:00 app[web.1]: Completed 500 Internal Server Error in 150ms
2012-04-06T16:52:23+00:00 app[web.1]: 6: <title>Weddoo!</title>
2012-04-06T16:52:23+00:00 app[web.1]:
2012-04-06T16:52:23+00:00 app[web.1]: 7: <%= csrf_meta_tags %>
2012-04-06T16:52:23+00:00 app[web.1]: 8:
2012-04-06T16:52:23+00:00 app[web.1]: 10:
2012-04-06T16:52:23+00:00 app[web.1]: 9: <%= stylesheet_link_tag "application", :media => "all" %>
2012-04-06T16:52:23+00:00 app[web.1]: 11: <link href="images/favicon.ico" rel="shortcut icon">
2012-04-06T16:52:23+00:00 heroku[router]: GET weddoo.heroku.com/ dyno=web.1 queue=0 wait=0ms service=206ms status=500 bytes=728
2012-04-06T16:52:23+00:00 app[web.1]: 12: <link href="images/apple-touch-icon.png" rel="apple-touch-icon">
2012-04-06T16:52:23+00:00 app[web.1]: app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___37461260917978840_28780360'
2012-04-06T16:52:23+00:00 app[web.1]: app/controllers/posts_controller.rb:24:in `new'
2012-04-06T16:52:23+00:00 app[web.1]:
2012-04-06T16:52:23+00:00 app[web.1]:
2012-04-06T16:52:23+00:00 app[web.1]: cache: [GET /] miss
2012-04-06T16:52:24+00:00 heroku[nginx]: 115.186.162.46 - - [06/Apr/2012:16:52:24 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" weddoo.heroku.com
GEMFILE
source 'http://rubygems.org'
gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'pg'
gem 'json'
gem "twitter-bootstrap-rails", "~> 2.0.1.0"
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
RAKEFILE
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Mysalary::Application.load_tasks
HEROKU INFO
=== weddoo
Addons: Shared Database 5MB
Database Size: 64k
Dynos: 1
Git URL: git#heroku.com:weddoo.git
Owner: postkhalid#yahoo.com
Repo Size: 11M
Slug Size: 11M
Stack: bamboo-mri-1.9.2
Web URL: http://weddoo.heroku.com/
Workers: 0
So based upon the heroku info that you provided I see that you are on the bamboo stack and that stack does not support Rails 3.1+. Only the cedar stack supports Rails 3.1+. You'll need to use the following command to create a new app on the cedar stack:
heroku create --stack cedar
This is the result of your stylesheets not being compiled. Heroku will attempt to run
rake assets:precompile
before deploying your app. If the precompile command fails it will fail silently for now. I actually have an open issue for this on Heroku
https://github.com/heroku/heroku-buildpack-ruby/issues/9
The most likely cause is that the Rakefile is trying to load (or access) a gem. Heroku buildpacks attempt to compile the stylesheets before they have access to the gemset so any requires will fail. The best way to avoid this is to wrap those requires in your Rakefile in environment specific conditionals:
if Rails.env == 'development' || Rails.env == 'test'
require 'somegem1'
require 'somegem2'
# whatever code is being used by those gems goes in this block
end

undefined local variable or method `application_controller' for main:Object

I have a problem with setting up rails application. We use rails 3 (we also use memcached), and have I installed everthing (DB, ruby, rubygems, rails, ...) and configure the DB. So if I run rails server the apllication starts ok.
For production we will use Apache and Phusion Passenger, both have been installed sucessfuly. When I restart apache I get this error:
*
[ pid=1557 thr=-608134948 file=utils.rb:176 time=2011-08-13 12:51:05.974 ]: *** Exception NameError in PhusionPassenger::Rack::ApplicationSpawner (undefined local variable or method `application_controller' for main:Object) (process 1557, thread #<Thread:0xb78131b8>):
from /media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application.rb:1
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:346:in `require_or_load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:300:in `depend_on'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:216:in `require_dependency'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:138:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/finisher.rb:41
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
from /media/Disc/ABC/CODE/TESTINGAPP/config/environment.rb:5
from config.ru:3:in `require'
from config.ru:3
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from config.ru:1:in `new'
from config.ru:1
*
First I thought that it might be sometnig with memcached, like some missing module for apache, but I read that there is no configuration needed for apache/passenger.
My question is, why application doesn't start? Have I forgot to install or configure someting? I really don't know what might be wronge since the application starts ok with rails server.
Tnx in advance ;)
Look at this file:
/media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application.rb
Since Rails 2.3 this file should be called application_controller.rb and not application.rb. Rename the file and it should work:
/media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application_controller.rb