在heroku上不断出现应用程序错误



自从上次提交给heroku以来,每当我试图访问我的应用程序时,我都会收到这个错误"应用程序中出现错误,无法提供您的页面。请稍后再试。

如果您是应用程序所有者,请查看日志以了解详细信息。"

所以我运行heroku-logs命令,我无法理解日志错误。据我所知,bcrypt宝石有问题,但我不确定是什么。任何帮助/解决方案都将不胜感激,谢谢。

$ 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'

很难阅读,但我认为关键的一行是:

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并尝试重新部署;

你没疯-我也犯了同样的错误,通过在我的Gemfile中用gem 'bcrypt-ruby', '~> 3.0.0'替换gem 'bcrypt-ruby',可以让事情正常工作。

似乎有什么东西,某个地方正在指定bcrypt-ruby (~> 3.0.0)-不知道是什么。。。

当您的问题发布时(2013年7月6日)Rails secure_password.rb正在使用gem 'bcrypt-ruby', '~> 3.0.0'

2013年7月17日,Rails secure_password.rb更新为使用gem 'bcrypt-ruby', '~> 3.1.0'

请参阅提交:https://github.com/rails/rails/commit/ad62cf68f89506b0a5074fec8e08d104865aa0ee#L1L47

我认为在Heroku使用包含上述提交的Rails版本之前,您不能在Gemfile中使用gem 'bcrypt-ruby', '~> 3.1.0'

要解决您的问题:
Gemfile中使用gem 'bcrypt-ruby', '~> 3.0.0'
然后执行bundle install以更新您的Gemfile.lock
git add .git commit -m "Using gem bcrypt-ruby ~> 3.0.0"
最后git push heroku master

相关内容

  • 没有找到相关文章

最新更新