i'm having issue ruby on rails app have hosted on heroku
. no matter push repo, internal server error
string presented me no additional information on did wrong.
every change decide make work great locally, can't seem avoid causes internal server error
every time push. have keep rolling , figure out need fix make stop happening.
does have suggestion me?
update
i rolled repo stable changeset, , cloned repo directory on machine. made small change javascript file fix minor bug, , push caused site go down , give internal server error
message. wrong environment?
update 2
for have gave answers, please review comments question of suggestions have been addressed. thanks!
answer:
i'll have admit still don't understand why things behaving way were, commit seemed pushed fine without breaking site included ternary operator rubymine didn't seem mind. after point, every commit caused internal server error
thereafter. after converting ternary operator if-else-end
conditional statement, behavior ceased. hope helps similar issue in future, albeit obscure.
the main problem see logs is
!! unexpected error while processing request: can't modify frozen array
a quick google search "rails production can't modify frozen array" gave related question on (also heroku.)
other things can do:
- run
heroku run script/rails console
, out errors. - install postgresql on development machine , entire test run in production mode. means running
rake db:load_schema
,rake assets:precompile
, ,rails s
rails_env=production
prefix. make sure usingthin
. - start vm mirrors heroku's setup, number 2 foreman.
- sign airbrake , check errors.
(actually if did 3. , still works on local machine, it's time contact heroku support.)
last resort: binary search
let's call current repo project.git
. make copy of repo, , rename master branch future
. checkout earliest working commit of future
master branch of new repo, , create new heroku app. push , test.
- if no errors, jump forward midpoint.
- if there error, jump backwards.
- push , test. repeat.
keeping doing until find exact commit introduced bug. takes long time. git bisect might useful.
Comments
Post a Comment