2013-12-12 152 views
0

我就到軌崩潰部署後的問題我的部署工作正常,我創建了一個標準的Rails應用程序與rails new myapp --database=postgresql然後,我承諾我的變化,並推到Heroku的告訴我:Heroku的部署後(

git push 
Fetching repository, done. 
Counting objects: 25, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (18/18), done. 
Writing objects: 100% (18/18), 1.94 KiB | 0 bytes/s, done. 
Total 18 (delta 14), reused 0 (delta 0) 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.0.0 
-----> Installing dependencies using Bundler version 1.3.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment 
     Using rake (10.1.0) 
     Using i18n (0.6.9) 
     Using minitest (4.7.5) 
     Using multi_json (1.8.2) 
     Using atomic (1.1.14) 
     Using thread_safe (0.1.3) 
     Using tzinfo (0.3.38) 
     Using activesupport (4.0.2) 
     Using builder (3.1.4) 
     Using erubis (2.7.0) 
     Using rack (1.5.2) 
     Using rack-test (0.6.2) 
     Using actionpack (4.0.2) 
     Using mime-types (1.25.1) 
     Using polyglot (0.3.3) 
     Using treetop (1.4.15) 
     Using mail (2.5.4) 
     Using actionmailer (4.0.2) 
     Using activemodel (4.0.2) 
     Using activerecord-deprecated_finders (1.0.3) 
     Using arel (4.0.1) 
     Using activerecord (4.0.2) 
     Using coffee-script-source (1.6.3) 
     Using execjs (2.0.2) 
     Using coffee-script (2.2.0) 
     Using thor (0.18.1) 
     Using railties (4.0.2) 
     Using coffee-rails (4.0.1) 
     Using hike (1.2.3) 
     Using jbuilder (1.5.3) 
     Using jquery-rails (3.0.4) 
     Using json (1.8.1) 
     Using pg (0.17.0) 
     Using bundler (1.3.2) 
     Using tilt (1.4.1) 
     Using sprockets (2.10.1) 
     Using sprockets-rails (2.0.1) 
     Using rails (4.0.2) 
     Using rdoc (3.12.2) 
     Using sass (3.2.12) 
     Using sass-rails (4.0.1) 
     Using sdoc (0.3.20) 
     Using turbolinks (2.0.0) 
     Using uglifier (2.3.3) 
     Your bundle is complete! It was installed into ./vendor/bundle 
     Bundle completed (0.46s) 
     Cleaning up the bundler cache. 
-----> Writing config/database.yml to read from DATABASE_URL 
-----> Preparing app for Rails asset pipeline 
     Running: rake assets:precompile 
     Asset precompilation completed (1.92s) 
     Cleaning assets 
-----> WARNINGS: 
     Include 'rails_12factor' gem to enable all platform features 
     See https://devcenter.heroku.com/articles/rails-integration-gems for more information. 

    You have not declared a Ruby version in your Gemfile. 
    To set your Ruby version add this line to your Gemfile: 
    ruby '2.0.0' 
    # See https://devcenter.heroku.com/articles/ruby-versions for more information. 
-----> Discovering process types 
     Procfile declares types -> (none) 
     Default types for Ruby -> console, rake, web, worker 

-----> Compressing... done, 21.3MB 
-----> Launching... done, v10 
    http://communityshare-web.herokuapp.com deployed to Heroku 

To [email protected]:communityshare-web.git 
    1488048..2268228 master -> master 

所以看起來一切正常,但是當我訪問我的Heroku應用程序,我得到一個錯誤頁面

運行heroku logs後,我看到以下內容:

2013-12-12T21:56:18.114338+00:00 heroku[web.1]: State changed from crashed to starting 
2013-12-12T21:56:25.558687+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 6442 -e $RAILS_ENV` 
2013-12-12T21:56:26.741673+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/inflector/methods.rb:3:in `<top (required)>' 
2013-12-12T21:56:26.741673+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/inflector/inflections.rb:1:in `require': cannot load such file -- thread_safe (LoadError) 
2013-12-12T21:56:26.741673+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/inflector/inflections.rb:1:in `<top (required)>' 
2013-12-12T21:56:26.741673+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/inflector/methods.rb:3:in `require' 
2013-12-12T21:56:26.741673+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies/autoload.rb:1:in `require' 
+0

請新增Heroku的整個輸出,你推的時候看到了。這包括有關正在安裝哪些寶石的信息,並將幫助他人診斷問題。 –

回答

0

我不使用rails,但是我在heroku上有類似的節點問題 - 我忘了將依賴項保存到我的package.json文件,而且heroku不知道要下載它。看起來你的主動支持寶石存在同樣的問題。

1

它看起來像你需要

gem thread_safe

添加到您的Gemfile,然後重新運行

bundle

但是,如果有一個運行日誌或heroku logs -n 500運行heroku logs --tail其他錯誤具體數量的行,應該有助於獲得更多的細節

+0

這解決了我的問題。謝謝! – r351574nc3

0

僅供參考,您是否將您的紅寶石版本添加到您的Gemfile中?
類似這樣的東西..

--------- Gemfile ----------------------------- ----

source 'https://rubygems.org' 
ruby "2.0.0" 

gem list .... 

確保你捆綁一次,希望幫助..