1

アプリケーションにアクセスしようとするたびに heroku に最後にコミットして以来、「アプリケーションでエラーが発生したため、ページを提供できませんでした。しばらくしてからもう一度お試しください。

あなたがアプリケーションの所有者である場合は、詳細についてログを確認してください。」

そのため、heroku logs コマンドを実行すると、ログ エラーの意味がわかりません。私が最も理解しているのは、bcrypt gemに何か問題があるということですが、何がわからないのですか。どんな助け/解決策も感謝します、ありがとう。

$ heroku logs
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
←[36m2013-07-06T17:18:26.969771+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from config.ru:3:in `block in <main>'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from config.ru:1:in `<main>'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from config.ru:3:in `require'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
←[36m2013-07-06T17:18:26.969966+00:00 app[web.1]:←[0m   from config.ru:1:in `new'
←[36m2013-07-06T17:18:26.970385+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
←[36m2013-07-06T17:18:28.491595+00:00 heroku[web.1]:←[0m Process exited with status 1
←[36m2013-07-06T17:18:28.500515+00:00 heroku[web.1]:←[0m State changed from starting to crashed
2013-07-06T17:21:11+00:00 heroku[slug-compiler]: Slug compilation started
←[33m2013-07-06T17:23:02.480186+00:00 heroku[api]:←[0m Deploy 9e263bb by blank@gmail.com
←[33m2013-07-06T17:23:02.502453+00:00 heroku[api]:←[0m Release v135 created by blank@gmail.com
←[33m2013-07-06T17:23:02.542045+00:00 heroku[api]:←[0m Deploy 9e263bb by blank@gmail.com
←[36m2013-07-06T17:23:02.621820+00:00 heroku[web.1]:←[0m State changed from crashed to starting
2013-07-06T17:23:03+00:00 heroku[slug-compiler]: Slug compilation finished
←[36m2013-07-06T17:23:08.258293+00:00 heroku[web.1]:←[0m Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 58707`
←[36m2013-07-06T17:23:16.272833+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have    Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move
them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
←[36m2013-07-06T17:23:16.273194+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move
them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
←[36m2013-07-06T17:23:21.753335+00:00 app[web.1]:←[0m
←[36m2013-07-06T17:23:21.753335+00:00 app[web.1]:←[0m  Called from: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/abstract_store.rb:28:
in `initialize'.
←[36m2013-07-06T17:23:21.753335+00:00 app[web.1]:←[0m
←[36m2013-07-06T17:23:26.052416+00:00 app[web.1]:←[0m Connecting to database specified by DATABASE_URL
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/rubygems_integration.rb:224:in `block in replace_gem': can't activate bc
rypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.0. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
←[36m2013-07-06T17:23:26.534901+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activemodel-3.2.8/lib/active_model/secure_password.rb:37:in `has_secure_password'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/app/models/member.rb:1:in `<top (required)>'
←[36m2013-07-06T17:23:26.533679+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:192:in `block in const_missing'
←[36m2013-07-06T17:23:26.534559+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:260:in `safe_constantize'
←[36m2013-07-06T17:23:26.533565+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:502:in `load_missing_constant'
←[36m2013-07-06T17:23:26.534019+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in `const_missing'
←[36m2013-07-06T17:23:26.534443+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `constantize'
←[36m2013-07-06T17:23:26.535034+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels)
in with'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/app/models/member.rb:4:in `<class:Member>'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
←[36m2013-07-06T17:23:26.534224+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in `block in constantize'
←[36m2013-07-06T17:23:26.533047+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
←[36m2013-07-06T17:23:26.533413+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-07-06T17:23:26.534332+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `each'
←[36m2013-07-06T17:23:26.533413+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in `require_or_load'
←[36m2013-07-06T17:23:26.533921+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in `each'
←[36m2013-07-06T17:23:26.535192+00:00 app[web.1]:←[0m   from /app/app/controllers/members_controller.rb:1:in `<top (required)>'
←[36m2013-07-06T17:23:26.538409+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
←[36m2013-07-06T17:23:26.534559+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
←[36m2013-07-06T17:23:26.534787+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_default
s'
←[36m2013-07-06T17:23:26.538409+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-07-06T17:23:26.538514+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:225:in `require_dependency'
←[36m2013-07-06T17:23:26.538646+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
←[36m2013-07-06T17:23:26.534559+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constanti
ze'
←[36m2013-07-06T17:23:26.535135+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.8/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
←[36m2013-07-06T17:23:26.538409+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in `require_or_load'
←[36m2013-07-06T17:23:26.538646+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
←[36m2013-07-06T17:23:26.538409+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
←[36m2013-07-06T17:23:26.538514+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:313:in `depend_on'
←[36m2013-07-06T17:23:26.542055+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from config.ru:1:in `new'
←[36m2013-07-06T17:23:26.541993+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
←[36m2013-07-06T17:23:26.541767+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
←[36m2013-07-06T17:23:26.541993+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from config.ru:3:in `block in <main>'
←[36m2013-07-06T17:23:26.538646+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
←[36m2013-07-06T17:23:26.538409+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-07-06T17:23:26.538646+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
←[36m2013-07-06T17:23:26.541767+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
←[36m2013-07-06T17:23:26.541993+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
←[36m2013-07-06T17:23:26.542055+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
←[36m2013-07-06T17:23:26.541890+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from config.ru:3:in `require'
←[36m2013-07-06T17:23:26.538646+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from /app/config/environment.rb:5:in `<top (required)>'
←[36m2013-07-06T17:23:26.542437+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
←[36m2013-07-06T17:23:26.542437+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from config.ru:1:in `<main>'
←[36m2013-07-06T17:23:26.542437+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
←[36m2013-07-06T17:23:26.542304+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
←[36m2013-07-06T17:23:26.542152+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
←[36m2013-07-06T17:23:26.542304+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
←[36m2013-07-06T17:23:26.542437+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
←[36m2013-07-06T17:23:26.542437+00:00 app[web.1]:←[0m   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
←[36m2013-07-06T17:23:27.988495+00:00 heroku[web.1]:←[0m Process exited with status 1
←[36m2013-07-06T17:23:28.000207+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[32m2013-07-06T17:23:28.664077+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path=/ host=paradisedkp.herokuapp.com fwd="69.43.65.182" dyno= connect= service=
status=503 bytes=

gemfile

source 'http://rubygems.org'

ruby '1.9.3'
gem 'json', '1.7.7'
gem 'rails', '3.2.8'

group :development, :test do
  gem 'mysql2'
end
group :production do
  gem 'pg'
  gem 'thin'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'heroku'
gem 'bcrypt-ruby', '~> 3.1.0'
gem 'mail'
gem 'will_paginate', '~> 3.0.0'
gem 'rufus-scheduler'
gem 'rails_autolink'
4

3 に答える 3

2

読みにくいですが、重要なのは次の行だと思います。

can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.0. Make sure all dependencies are added to Gemfile. (Gem::LoadError)

追加してから再デプロイしてみてください。

編集:

次の行を Gemfile に追加します。

gem 'bcrypt-ruby', '~> 3.1.0'

次に実行しbundle update bcrypt-rubyます。git で Gemfile と Gemfile.lock の両方を追加し、再デプロイを試みます。

于 2013-07-06T18:28:45.737 に答える
0

あなたの質問が投稿されたとき (2013 年 7 月 6 日) secure_password.rb、Rails はgem 'bcrypt-ruby', '~> 3.0.0'

2013 年 7 月 17 日に Railssecure_password.rbが更新され、gem 'bcrypt-ruby', '~> 3.1.0'

コミットを参照してください: https://github.com/rails/rails/commit/ad62cf68f89506b0a5074fec8e08d104865aa0ee#L1L47

Heroku が上記の commit を含むバージョンの Rails を使用するまでgem 'bcrypt-ruby', '~> 3.1.0'、あなたが使用できるとは思いません。Gemfile

問題を解決するには:で
使用gem 'bcrypt-ruby', '~> 3.0.0'しますGemfile
次にbundle install、更新を行いますGemfile.lock
それからgit add .そしてgit commit -m "Using gem bcrypt-ruby ~> 3.0.0"
最後にgit push heroku master

于 2013-07-21T14:52:46.567 に答える