2013-12-12 149 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 .... 

确保你捆绑一次,希望帮助..