0

我在我的应用程序中添加了一些喜欢/不喜欢的功能。在heroku上一切都运行良好,在生产中一切仍然运行良好。但是当我推到heroku时,它不再起作用了。我尝试运行 heroku run rake db:migrate 几次,在我的 gem 文件(1.9.3)中指定 ruby​​ 的版本,然后重新创建 heroku 应用程序。不知道为什么它在开发中运行良好但在生产中弄湿了床

这是我的heroku日志:

2013-07-23T04:47:14.714935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-07-23T04:47:14.714935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-07-23T04:47:14.714935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-07-23T04:47:14.714935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-07-23T04:47:14.714935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-07-23T04:47:14.715229+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-07-23T04:47:14.715229+00:00 app[web.1]:    from script/rails:6:in `require'
2013-07-23T04:47:14.715229+00:00 app[web.1]:    from script/rails:6:in `<main>'
2013-07-23T04:47:16.033612+00:00 heroku[web.1]: Process exited with status 1
2013-07-23T04:47:16.053842+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-23T04:57:38.666709+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-23T04:58:59.531570+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 35635`
2013-07-23T04:59:39.923304+00:00 heroku[web.1]: State changed from starting to down
2013-07-23T04:59:45.880294+00:00 app[web.1]: 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.
as-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-07-23T04:59:45.880294+00:00 app[web.1]: 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.
as-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-07-23T04:59:52.132366+00:00 app[web.1]: => Call with -d to detach
2013-07-23T04:59:52.132366+00:00 app[web.1]: => Rails 3.2.13 application starting in production on http://0.0.0.0:35635
2013-07-23T04:59:52.132366+00:00 app[web.1]: => Booting WEBrick
2013-07-23T04:59:52.132366+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-07-23T04:59:52.132366+00:00 app[web.1]: Exiting
2013-07-23T04:59:52.133728+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined method `before_image_post_process' for #<Class:0x00000003158238> (NoMethodError)
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:58:in `create_validating_before_filter'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators/attachment_content_type_validator.rb:78:in `validates_attachment_content_type'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/app/models/pin.rb:9:in `<class:Pin>'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/app/models/pin.rb:1:in `<top (required)>'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:49:in `each'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:49:in `validate_before_processing'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:51:in `block in validate_before_processing'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:40:in `block in validates_attachment'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:32:in `each'
2013-07-23T04:59:52.133728+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.0/lib/paperclip/validators.rb:32:in `validates_attachment'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2013-07-23T04:59:52.133911+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `each'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:260:in `safe_constantize'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
2013-07-23T04:59:52.134072+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/app/controllers/pins_controller.rb:1:in `<top (required)>'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:313:in `depend_on'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-07-23T04:59:52.134560+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `each'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:438:in `block in eager_load!'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `each'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:436:in `eager_load!'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-07-23T04:59:52.134734+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-07-23T04:59:52.135063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-07-23T04:59:52.135219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
2013-07-23T04:59:52.135550+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
2013-07-23T04:59:52.135550+00:00 app[web.1]:    from script/rails:6:in `require'
2013-07-23T04:59:52.135550+00:00 app[web.1]:    from script/rails:6:in `<main>'
2013-07-23T04:59:53.382360+00:00 heroku[web.1]: Process exited with status 1
2013-07-23T05:21:56.106289+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.oinkbay.com fwd="66.249.75.216" dyno= connect= service= status=503 bytes=
2013-07-23T05:43:51.030933+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/assets/Pigb-c122571e288ec48af85914695af78375.png host=www.oinkbay.com fwd="66.249.75.200" dyno= connect= service= status=503 bytes=
2013-07-23T07:12:47.538191+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/assets/bigpig3-77ff62e72c2ea35d6ecd6e1f9f8931b7.png host=www.oinkbay.com fwd="66.249.75.43" dyno= connect= service= status=503 bytes=
2013-07-23T08:17:27.816539+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/assets/woofberryteam-c20133a1beac5db9a2c2b391dc1a5895.png host=www.oinkbay.com fwd="66.249.75.167" dyno= connect= service= status=503 bytes=
2013-07-23T10:34:36.299993+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/assets/Pig3b-8408e8eb48bc9f6a51572d729d297bf1.png host=www.oinkbay.com fwd="66.249.75.114" dyno= connect= service= status=503 bytes=
2013-07-23T13:19:15.200220+00:00 heroku[web.1]: State changed from down to starting
2013-07-23T13:19:20.080549+00:00 heroku[web.1]: Starting process with command
4

2 回答 2

1

已解决 问题是我没有在我的 gem 文件中使用特定版本的回形针,而在 heroku 上使用的较新版本没有工作

于 2013-07-24T03:07:27.443 回答
1

回形针 gem 于 7 月 19 日更新到 3.5,其中似乎包含路由错误。

最好在 gemfile (3.4.2) 中指定以前的版本

gem 'paperclip', '3.4.2'
于 2013-07-24T21:33:30.883 回答