0

デプロイ後のレールのクラッシュに関する私の質問。私の展開はうまくいきます。で標準的なRailsアプリを作成しましたrails new myapp --database=postgresql。次に、変更をコミットし、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 git@heroku.com: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'
4

3 に答える 3

0

私はレールを使用していませんが、heroku のノードで同様の問題がありました。package.json ファイルに依存関係を保存するのを忘れていたため、heroku はそれをダウンロードすることを知りませんでした。アクティブなサポート ジェムで同じ問題が発生しているようです。

于 2013-12-12T23:44:05.313 に答える
0

参考までに、Ruby バージョンを Gemfile に追加しましたか?
このようなもの..

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

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

gem list ....

もう一度バンドルしてください。お役に立てば幸いです..

于 2013-12-14T18:01:00.847 に答える