0

ve been working on Ruby on Rails application development using NitrousIO for my environment and Heroku for Deployment. For some of the modules I could successfully deploy on Heroku and it's working fine but for some of the modules, it says We're sorry, but something went wrong.

I've been all the steps like heroku run rake db:migrate after pushing the latest code to heroku but no success But on NitrousIO, everything works perfect

  1. What are the ways now to reset my db on Heroku such that It can work for all the modules without issues. Guide/Point me the step-by-step procedure please
  2. Is there only db reset option to get going or do we have any intermediate solution which gets me out of this situation ?

These are my Heroku Logs with 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)$ 

enter image description here

Ramakishna Balla
  • 1,020
  • 1
  • 8
  • 12
  • All the command for Heroku database can be found listed here: http://stackoverflow.com/questions/4820549/how-to-empty-db-in-heroku If they don't help, can you post what exact error are you getting from Heroku? You should be able to see it in logs `heroku logs` (`heroku logs -n 1500` if you need more). – basiam Jan 16 '15 at 09:54
  • I've pasted my logs now. Even I've tried heroku pg:reset DATABASE and restarted it again but still the same issue like 'we'r sorry.....' Let me know if any additional info is required... – Ramakishna Balla Jan 16 '15 at 10:08
  • hmm, there is no error in this part of logs. Can you 1) try to trigger the error 2) see what shows up in logs immediately after you see "we're sorry.." 3) find the error log and paste just it? – basiam Jan 16 '15 at 16:02
  • attached the simplified snapshot of the logs with the latest error of the same. Hope this helps you. – Ramakishna Balla Jan 16 '15 at 16:42
  • There is no error in this logs, everything looks good here. Did you check them immediately after getting `We're sorry, but something went wrong` message? You should see error trace and `500 Internal Server Error` etc. – basiam Jan 16 '15 at 17:08
  • even that's what I'm wondering as well. I don't see any other error log info which can help me dig deeper to get out of this issue :( – Ramakishna Balla Jan 16 '15 at 17:11
  • 1
    go to `confing/environments/production.rb` (or `staging.rb` if you're running heroku in staging environment) and and set `config.consider_all_requests_local = true`. This way you will see actual error and not `we're sorry...` screen. – basiam Jan 17 '15 at 13:03
  • @basia, Thanks...that enabled me to look at the error message. I've put the latest error message as the screen-shot. Please help to resolve. – Ramakishna Balla Jan 17 '15 at 13:49

1 Answers1

0

Based on the 'Missing host to link to' error message in your screenshot it looks like you are missing some configuration. The link_to method needs to know the hostname to use to generate the full URL for the given link. You can configure this in each environment file, in this case you need to add something like this to your config/environments/production.rb:

config.action_mailer.default_url_options = { :host => "enterpriseape-ramakballa.herokuapp.com" }
Steve
  • 15,606
  • 3
  • 44
  • 39