Heroku迁移问题

时间:2015-01-16 07:29:21

标签: ruby-on-rails heroku

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

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

  1. 现在有什么方法可以在Heroku上重置我的数据库,以便它可以在没有问题的情况下适用于所有模块。请指导/指出一步一步的程序
  2. 是否只有db reset选项才能开始,或者我们是否有任何中间解决方案让我摆脱这种情况?
  3. 这些是带有heroku logs -n 250

    的Heroku日志
        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)$ 
    

    enter image description here

1 个答案:

答案 0 :(得分:0)

根据屏幕截图中的“缺少要链接的主机”错误消息,您似乎缺少某些配置。 link_to方法需要知道用于生成给定链接的完整URL的主机名。您可以在每个环境文件中对此进行配置,在这种情况下,您需要向config/environments/production.rb添加类似的内容:

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