Reputation: 111
I've been having real trouble getting my app to run on Heroku. I'm pretty sure the problem is coming from the fact that I'm using assetrecord and sqlite3 in my app.
This is the output of the logs;
2012-01-27T17:50:06+00:00 heroku[router]: GET stark-mountain-2291.heroku.com/ dyno=web.1 queue=0 wait=0ms service=3ms status=500 bytes=728
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:50:20+00:00 app[web.1]: Started GET "/" for 2.220.71.74 at 2012-01-27 09:50:20 -0800
2012-01-27T17:50:20+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:50:20+00:00 heroku[router]: GET stark-mountain-2291.heroku.com/ dyno=web.1 queue=0 wait=0ms service=6ms status=500 bytes=728
2012-01-27T17:50:20+00:00 app[web.1]: cache: [GET /] miss
2012-01-27T17:50:20+00:00 app[web.1]:
2012-01-27T17:51:08+00:00 heroku[slugc]: Slug compilation started
2012-01-27T17:51:21+00:00 heroku[api]: Deploy 7b17242 by [email protected]
2012-01-27T17:51:21+00:00 heroku[api]: Release v11 created by [email protected]
2012-01-27T17:51:22+00:00 heroku[web.1]: State changed from up to bouncing
2012-01-27T17:51:22+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-27T17:51:22+00:00 heroku[web.1]: State changed from created to starting
2012-01-27T17:51:22+00:00 heroku[slugc]: Slug compilation finished
2012-01-27T17:51:25+00:00 heroku[web.1]: Starting process with command `thin -p 52873 -e production -R /home/heroku_rack/heroku.ru start`
2012-01-27T17:51:26+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-01-27T17:51:26+00:00 app[web.1]: >> Stopping ...
2012-01-27T17:51:26+00:00 heroku[web.1]: Process exited
2012-01-27T17:51:28+00:00 heroku[web.1]: State changed from starting to up
2012-01-27T17:51:28+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-01-27T17:51:28+00:00 app[web.1]: >> Maximum connections set to 1024
2012-01-27T17:51:28+00:00 app[web.1]: >> Listening on 0.0.0.0:52873, CTRL+C to stop
2012-01-27T17:51:31+00:00 heroku[router]: GET stark-mountain-2291.heroku.com/ dyno=web.1 queue=0 wait=0ms service=141ms status=500 bytes=728
2012-01-27T17:51:31+00:00 heroku[nginx]: 2.220.71.74 - - [27/Jan/2012:17:51:31 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7" stark-mountain- 2291.heroku.com
2012-01-27T17:51:31+00:00 app[web.1]:
2012-01-27T17:51:31+00:00 app[web.1]:
2012-01-27T17:51:31+00:00 app[web.1]: Started GET "/" for 2.220.71.74 at 2012-01-27 09:51:31 -0800
2012-01-27T17:51:31+00:00 app[web.1]: Processing by PagesController#home as HTML
2012-01-27T17:51:31+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (31.1ms)
2012-01-27T17:51:31+00:00 app[web.1]: Completed 500 Internal Server Error in 82ms
2012-01-27T17:51:31+00:00 app[web.1]:
2012-01-27T17:51:31+00:00 app[web.1]: ActionView::Template::Error (application.css isn't precompiled):
2012-01-27T17:51:31+00:00 app[web.1]: 11: <!-- END HTML5.js -->
2012-01-27T17:51:31+00:00 app[web.1]: 12:
2012-01-27T17:51:31+00:00 app[web.1]: 13: <!-- Load Assets -->
2012-01-27T17:51:31+00:00 app[web.1]: 14: <%= stylesheet_link_tag "application" %>
2012-01-27T17:51:31+00:00 app[web.1]:
2012-01-27T17:51:31+00:00 app[web.1]: cache: [GET /] miss
2012-01-27T17:51:31+00:00 app[web.1]: 17: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js" type="text/javascript"></script>
2012-01-27T17:51:31+00:00 app[web.1]: 16: <%= javascript_include_tag "jquery- 1.7.1.min.js" %>
2012-01-27T17:51:31+00:00 app[web.1]: 15: <%= javascript_include_tag "pixel" %>
2012-01-27T17:51:31+00:00 app[web.1]: app/views/layouts/application.html.erb:14:in `_app_views_layouts_application_html_erb___1055267037675301688_25854420'
2012-01-27T17:51:31+00:00 app[web.1]:
2012-01-27T17:52:07+00:00 heroku[slugc]: Slug compilation started
2012-01-27T17:52:20+00:00 heroku[web.1]: State changed from up to bouncing
2012-01-27T17:52:20+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-27T17:52:20+00:00 heroku[web.1]: State changed from created to starting
2012-01-27T17:52:20+00:00 heroku[api]: Deploy c5f2759 by [email protected]
2012-01-27T17:52:20+00:00 heroku[api]: Release v12 created by [email protected]
2012-01-27T17:52:20+00:00 heroku[slugc]: Slug compilation finished
2012-01-27T17:52:23+00:00 heroku[web.1]: Starting process with command `thin -p 51747 -e production -R /home/heroku_rack/heroku.ru start`
2012-01-27T17:52:23+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-01-27T17:52:23+00:00 app[web.1]: >> Stopping ...
2012-01-27T17:52:23+00:00 heroku[web.1]: Process exited
2012-01-27T17:52:27+00:00 app[web.1]: >> Maximum connections set to 1024
2012-01-27T17:52:27+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-01-27T17:52:27+00:00 app[web.1]: >> Listening on 0.0.0.0:51747, CTRL+C to stop
2012-01-27T17:52:27+00:00 heroku[web.1]: State changed from starting to up
2012-01-27T17:57:12+00:00 heroku[slugc]: Slug compilation started
2012-01-27T17:57:24+00:00 heroku[api]: Deploy e875fca by [email protected]
2012-01-27T17:57:24+00:00 heroku[api]: Release v13 created by [email protected]
2012-01-27T17:57:25+00:00 heroku[slugc]: Slug compilation finished
2012-01-27T17:57:24+00:00 heroku[web.1]: State changed from up to bouncing
2012-01-27T17:57:24+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-27T17:57:24+00:00 heroku[web.1]: State changed from created to starting
2012-01-27T17:57:27+00:00 heroku[web.1]: Starting process with command `thin -p 17421 -e production -R /home/heroku_rack/heroku.ru start`
2012-01-27T17:57:28+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-01-27T17:57:28+00:00 app[web.1]: >> Stopping ...
2012-01-27T17:57:28+00:00 heroku[web.1]: Process exited
2012-01-27T17:57:32+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-01-27T17:57:32+00:00 app[web.1]: >> Maximum connections set to 1024
2012-01-27T17:57:32+00:00 app[web.1]: >> Listening on 0.0.0.0:17421, CTRL+C to stop
2012-01-27T17:57:33+00:00 heroku[web.1]: State changed from starting to up
2012-01-27T18:00:10+00:00 heroku[slugc]: Slug compilation started
2012-01-27T18:00:22+00:00 heroku[api]: Deploy 3e62952 by [email protected]
2012-01-27T18:00:22+00:00 heroku[api]: Release v14 created by [email protected]
2012-01-27T18:00:23+00:00 heroku[web.1]: State changed from up to bouncing
2012-01-27T18:00:23+00:00 heroku[web.1]: State changed from bouncing to created
2012-01-27T18:00:23+00:00 heroku[web.1]: State changed from created to starting
2012-01-27T18:00:23+00:00 heroku[slugc]: Slug compilation finished
2012-01-27T18:00:26+00:00 heroku[web.1]: Starting process with command `thin -p 16125 -e production -R /home/heroku_rack/heroku.ru start`
2012-01-27T18:00:29+00:00 app[web.1]: >> Maximum connections set to 1024
2012-01-27T18:00:29+00:00 app[web.1]: >> Listening on 0.0.0.0:16125, CTRL+C to stop
2012-01-27T18:00:29+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2012-01-27T18:00:30+00:00 heroku[web.1]: State changed from starting to up
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 app[web.1]: Started GET "/" for 2.220.71.74 at 2012-01-27 10:00:34 -0800
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 app[web.1]: cache: [GET /] miss
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 app[web.1]:
2012-01-27T18:00:34+00:00 heroku[router]: GET stark-mountain-2291.heroku.com/ dyno=web.1 queue=0 wait=0ms service=497ms status=500 bytes=728
2012-01-27T18:00:34+00:00 heroku[nginx]: 2.220.71.74 - - [27/Jan/2012:18:00:34 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7" stark-mountain-2291.heroku.com
Here is my gemfile;
group :development do
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'rspec-rails'
end
group :test do
gem 'rspec'
gem 'webrat'
end`
My application.rb
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"`
I also tried adding this to my production.rb
# Fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
If anyone could point me in the right direction for this it would be awesome!
Sorry if I left anything out I'm still fresh!
Many Thanks
Chris :)
Upvotes: 1
Views: 242
Reputation: 37507
I'd start by deploying your application to the Cedar stack (which supports Rails 3.1 applications) - which it doesn't look like you are doing from your logs. Make sure you do;
heroku create --stack cedar
when you create your application. Also, you can't use sqlite3 on Heroku, you need to move that into a development group in your Gemfile and add a production group which contains pg, bundle and then push the Gemfile and Gemfile.lock to Heroku.
Upvotes: 1