Thursday 15 January 2015

Rails Unicorn Web Server Won't Start on Heroku -


I can not successfully launch my app in Harko, here are the basics:

    < Li> Ruby 1.9.3.392 (This is returned when I run Ruby-5 in my Dev Terminal, though the Harkak Logs indicate Ruby 2.0.0)
  • 3.2.13 tracks
  • Unicorn web server
  • Postgrescill DB

    I have posted my app in Harok but "an error occurred in the application and Your page could not be worked on. "

    The last entries in the break log are:

      + 00:00 ap [web.1]: from / app / vendor /bundle/ruby/2.0.0/bin/unicorn:23:in `& lt; Main & gt; '00: 00 Horoku [Web 1]: Status 1 + 00: 00 went out with Harcoco [Web 1]: The State was changed to crash   

    When I went to Harkoku I try to run Ps, I get:

      === Web (1x): `bundle AGC aconicorn-P $ port-c. / Config / unicorn.rb 'web.1: crash 2013/06/22 17:31:22 (~ 6m ago)   

    I think this It is possible that this app / config / application.rb

      ENV.update YAML.load (File.read (File.expand_path ('../ application.yml', __FILE__)) < / Code>  

    This line is useful in dev to read my environment variables from my application.yml file. However, for security purposes, I can digitize it with my reps and see the logs for each That this file is not found.

      Heroku config: add SECRET_TOKEN = a_really_long_number   my app 

    is here / config / unicorn.rb for production, I through my environment on Heroku Variable is defined

      # config / unicorn.rb worker_processes integer (ENV ["WEB_CONCURRENCY"]] 3) timeout 15 preload_app true before_fork | Server, worker | Signal.trap 'TERM' says 'Unicorn Master interrupts in period and send QUIT instead of yourself' Process.kill 'QUIT', Process.pid defined end? (ActiveRecord :: Base) and ActiveRecord :: Base.connection.disconnect! Work after the end. Server, worker | SignalTrap 'TERM' says, 'Stop the TEM by unicorn worker and do nothing. Wait for the Master to define 'QUIT' end? (ActiveRecord :: Base) and ActiveRecord :: Base.establish_connection end   

    and here is my Procfile

      Web: Bundle exec unicorn -p $ pORT - Both of my app / config / unicorn.rb and Procfile settings come from ./config/unicorn.rb   

    Based on some IRC guidelines, I installed Figaro Had not done that, but regret that did not resolve this issue.

    If you want to see the full app, then it has been posted here:

    If you have a guide what may be wrong or how can I troubleshoot further I appreciate your thank you.

    You meet with your analysis I have just drawn my code, made some changes and now Has started on.

    My only change;

    config / application.rb - moved line 12 & amp; From 13 to config / environment / development.rb - If you are using application.yml for Development Inventory Variables, then keep it like this. Other options, if your development environment Rails.env.development? is finally to conditionify row 13 with

    config / environment / production.rb . Code> - Line 33 # preceding # Mark is missing

No comments:

Post a Comment