Ошибки на Heroku Deploy Rails 3.1.3 - PullRequest
1 голос
/ 27 января 2012

У меня были реальные проблемы с запуском моего приложения на Heroku. Я почти уверен, что проблема в том, что я использую assetrecord и sqlite3 в своем приложении.

Это вывод логов;

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 devilstar1987@gmail.com
2012-01-27T17:51:21+00:00 heroku[api]: Release v11 created by devilstar1987@gmail.com
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 devilstar1987@gmail.com
2012-01-27T17:52:20+00:00 heroku[api]: Release v12 created by devilstar1987@gmail.com
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 devilstar1987@gmail.com
2012-01-27T17:57:24+00:00 heroku[api]: Release v13 created by devilstar1987@gmail.com
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 devilstar1987@gmail.com
2012-01-27T18:00:22+00:00 heroku[api]: Release v14 created by devilstar1987@gmail.com
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

Вот мой гемфайл;

group :development do
  gem 'sqlite3-ruby', :require => 'sqlite3'
  gem 'rspec-rails'
end

group :test do
  gem 'rspec'
  gem 'webrat'
end`

Мое приложение.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"`

Я также попытался добавить это в мой production.rb

# Fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true

Если бы кто-нибудь мог указать мне правильное направление для этого, это было бы здорово!

Извините, если я что-то пропустил, я еще свеж!

Большое спасибо

Крис:)

1 Ответ

1 голос
/ 28 января 2012

Я бы начал с развертывания вашего приложения в стек Cedar (который поддерживает приложения Rails 3.1), что, похоже, не похоже на то, что вы делаете из своих журналов.Убедитесь, что вы делаете;

heroku create --stack cedar

при создании приложения.Кроме того, вы не можете использовать sqlite3 в Heroku, вам нужно переместить его в группу разработки в вашем Gemfile и добавить рабочую группу, содержащую pg, bundle, а затем передать Gemfile и Gemfile.lock в Heroku.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...