首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Heroku移民问题

Heroku移民问题
EN

Stack Overflow用户
提问于 2015-01-16 07:29:21
回答 1查看 98关注 0票数 0

我一直在开发Rails应用程序,我的环境使用NitrousIO,部署时使用Heroku。对于某些模块,我可以成功地部署在Heroku上,而且它运行得很好,但是对于一些模块,它说We're sorry, but something went wrong.

在把最新的代码推给heroku之后,我已经完成了像heroku run rake db:migrate这样的所有步骤,但是没有成功,只有在NitrousIO上,一切都是完美的

  1. 现在在Heroku上重新设置我的db的方法是什么,这样它就可以在没有问题的情况下为所有模块工作。请给我指点步骤。
  2. 是否只有db重置选项才能启动,或者我们是否有任何中间解决方案可以使我摆脱这种情况?

这些是我使用heroku logs -n 250的Heroku日志

代码语言:javascript
复制
    action@rksrailszone-182221:~/enterpriseape(nesting-purchases)$ heroku logs -n 250                                                                                                                     
2015-01-16T16:35:08.590482+00:00 heroku[web.1]: Unidling                                                                                                                                              
2015-01-16T16:35:08.591399+00:00 heroku[web.1]: State changed from down to starting                                                                                                                   
2015-01-16T16:35:12.002231+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 46010 -e production`                                                                               
2015-01-16T16:35:16.619546+00:00 app[web.1]: [2015-01-16 16:35:16] INFO  WEBrick 1.3.1                                                                                                                
2015-01-16T16:35:16.619962+00:00 app[web.1]: [2015-01-16 16:35:16] INFO  WEBrick::HTTPServer#start: pid=3 port=46010                                                                                  
2015-01-16T16:35:16.619570+00:00 app[web.1]: [2015-01-16 16:35:16] INFO  ruby 2.0.0 (2014-11-13) [x86_64-linux]                                                                                       
2015-01-16T16:35:16.950487+00:00 heroku[web.1]: State changed from starting to up                                                                                                                     
2015-01-16T16:35:17.990652+00:00 heroku[router]: at=info method=GET path="/" host=enterpriseape-ramakballa.herokuapp.com request_id=6a0355dc-73fd-4b10-9a2e-066ae51a403a fwd="49.205.144.212" dyno=web
.1 connect=2ms service=115ms status=200 bytes=1896                                                                                                                                                    
2015-01-16T16:35:24.243086+00:00 heroku[router]: at=info method=GET path="/assets/application-f71602a6cb0cb5ada02d834e1b9e35cb.css" host=enterpriseape-ramakballa.herokuapp.com request_id=6251571f-d5
6c-4af4-bc4a-7bf0b4ea1961 fwd="49.205.144.212" dyno=web.1 connect=2ms service=5817ms status=304 bytes=231                                                                                             
2015-01-16T16:35:24.699601+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=enterpriseape-ramakballa.herokuapp.com request_id=0cc95f6f-5255-4345-8f63-e53c43bad31f fwd="49.205.144.21
2" dyno=web.1 connect=1ms service=9ms status=404 bytes=1829                                                                                                                                           
2015-01-16T16:35:50.967577+00:00 heroku[router]: at=info method=GET path="/invoices" host=enterpriseape-ramakballa.herokuapp.com request_id=e8cdea65-e2f0-4a5a-acbd-cbd599a5e8a6 fwd="49.205.144.212" 
dyno=web.1 connect=2ms service=108ms status=200 bytes=2765                                                                                                                                            
2015-01-16T16:35:51.378408+00:00 heroku[router]: at=info method=GET path="/assets/application-f71602a6cb0cb5ada02d834e1b9e35cb.css" host=enterpriseape-ramakballa.herokuapp.com request_id=9d2facec-b8
cb-40d5-aebf-264154e5e59e fwd="49.205.144.212" dyno=web.1 connect=2ms service=14ms status=304 bytes=231                                                                                               
action@rksrailszone-182221:~/enterpriseape(nesting-purchases)$ 

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-17 16:48:07

基于屏幕截图中的“缺少链接到的主机”错误信息,看起来您缺少了一些配置。link_to方法需要知道要用于生成给定链接的完整URL的主机名。您可以在每个环境文件中配置它,在本例中,您需要将类似的内容添加到您的config/environments/production.rb

代码语言:javascript
复制
config.action_mailer.default_url_options = { :host => "enterpriseape-ramakballa.herokuapp.com" }
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27979141

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档