Rails:Heroku首次部署失败 [英] Rails: Heroku Deploying for the First Time Failed

查看:99
本文介绍了Rails:Heroku首次部署失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以为问题是我正在使用SQLite3,所以我迁移到PostgreSQL,但问题仍然存在。该应用程序在本地正常工作。我打开我的应用程序与英雄开放,它给我以下错误:

I thought the problem was that I was using a SQLite3, so I migrated to PostgreSQL but the problem persists. The app works fine locally. I open my app with heroku open, it gives me the following error:

Application Error. An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details..

我尝试通过看着日志但失败了,所以我需要某人的帮助。 这是我的日志,感谢任何帮助!

I tried to find the resolution by looking at the logs but failed, so I need someone's help. Here are my logs and I appreciate any help!

2012-11-19T00:55:37+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 3545`
2012-11-19T00:55:39+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
the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-19T00:55:39+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
the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
2012-11-19T00:55:41+00:00 app[web.1]: /app/config/initializers/formtastic.rb:2:in `<top (required)>': uninitialized constant Formtastic (NameError)
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `each'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `block in <class:Engine>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'

2012-11-19T00:55:41+00:00 app[web.1]:   from config.ru:3:in `require'
2012-11-19T00:55:41+00:00 app[web.1]:   from config.ru:3:in `block in <main>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-11-19T00:55:41+00:00 app[web.1]:   from config.ru:1:in `new'
2012-11-19T00:55:41+00:00 app[web.1]:   from config.ru:1:in `<main>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `load'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'

2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2012-11-19T00:55:41+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start'
2012-11-19T00:55:42+00:00 heroku[web.1]: Process exited with status 1
2012-11-19T00:56:34+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fast-savannah-6843.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-19T00:56:34+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fast-savannah-6843.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-19T00:57:44+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=fast-savannah-6843.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-19T00:57:44+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=fast-savannah-6843.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=


推荐答案

对于首次部署者,这里是我遇到的问题,以及我如何解决他们:

1。 RailsInstaller和Heroku Toolbelt不完全兼容:如果您在安装Heroku工具箱后遇到问题,建议您全部删除railsinstaller和heroku toolbelt,并再次安装railsinstaller。然后,在您的宝石文件中,只需添加 gem'heroku'并运行软件包安装。我不需要任何额外的东西来成功部署我的应用程序。 Heroku Toolbelt安装了ruby 1.9.2 v,并增加了错误的路径。您可以选择手动将此PATH修复到正确的位置,例如C:RailsInstaller:Ruby1.9.3,但我发现更容易重新安装所有内容。

1. RailsInstaller and Heroku Toolbelt are not perfectly compatible: If you encounter problems after you install Heroku toolbelt, I suggest you delete railsinstaller and heroku toolbelt alltogether, and install railsinstaller again. Then, in your gem file, simply add gem 'heroku' and run bundle install. I didn't need any extra stuff to successfully deploy my app. Heroku Toolbelt installs ruby 1.9.2 v, and adds wrong path to your preference. You can choose to manually fix this PATH to the right location, ex) C:RailsInstaller:Ruby1.9.3 but I found it easier to reinstall everything.

2。您必须从SQLite3迁移到PostgreSQL :按照如果你不确定该怎么做。

2. You have to migrate from SQLite3 to PostgreSQL: follow this if you are unsure how to do it.

3。按照Heroku教程终于部署你的应用程序:按照这个。如果你发现一些与对象不存在一致的错误,请尝试运行 heroku run rake db:migrate

3. Follow Heroku tutorial to finally deploy your app: follow this. If you get errors that say something along line with "objects do not exist," try running heroku run rake db:migrate.

祝你好运部署!

这篇关于Rails:Heroku首次部署失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆