Rails method works in console but not through browser -
here's in model:
:after_save after_save def after_save self.delay.do_thing end def do_thing dir.mkdir("#{rails.root}/my/path") system("cd #{rails.root}/my/path && wget -with-some-flags") end
this works flawlessly in development. however, in production, nothing happens. no errors, nothing.
i've checked several things like:
- sending command log before it's run make sure it's built correctly
- running command manually check it's working
- opening production rails shell , doing
myobject.do_thing
, works! - switching between ticks ,
system()
command, check if subshells - adding absolute command paths,
/usr/bin/wget
instead, works in command line not in web browser. - checked permissions of folder it's saving to
i know do_thing
method running because creates folder in process of doing thing
, appear in filesystem, not result of wget.
i'm genuinely stumped here. ideas?
Comments
Post a Comment