Heroku 迁移问题

Heroku Migration Issues

一直致力于 Ruby Rails 应用程序开发,在我的环境中使用 NitrousIO,在部署中使用 Heroku。对于一些我可以在 Heroku 上成功部署的模块,它工作正常但是对于一些模块,它说 We're sorry, but something went wrong.

在将最新代码推送到 heroku 之后,我已经完成了 heroku run rake db:migrate 的所有步骤,但没有成功 但是在 NitrousIO 上,一切都完美无缺

  1. 现在有什么方法可以在 Heroku 上重置我的数据库,以便它可以毫无问题地适用于所有模块。 Guide/Point我step-by-step程序请
  2. 是否只有数据库重置选项可以开始,或者我们是否有任何中间解决方案可以让我摆脱这种情况?

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

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

根据屏幕截图中的 'Missing host to link to' 错误消息,您似乎缺少某些配置。 link_to 方法需要知道用于为给定 link 生成完整 URL 的主机名。您可以在每个环境文件中配置它,在这种情况下,您需要将类似的内容添加到您的 config/environments/production.rb:

config.action_mailer.default_url_options = { :host => "enterpriseape-ramakballa.herokuapp.com" }