I want to use rake background task in rails like this
system("cd #{Rails.root} && RAILS_ENV=#{Rails.env} rake abc:def --
trace 2>&1 >> #{Rails.root}/log/rake.log &")
This is ok in development environment, but will not work in production
mode.
I used logger to check whether the command string is generated ok or
not, but it seems every things is fine in production evironment:
cd /home/username/rails_staging/Abc/releases/20100904034630 &&
RAILS_ENV=production rake abc:def --trace 2>&1 >> /home/username/
rails_staging/Abc/releases/20100904034630/log/rake.log &
Any body has any ideas about why this can not work in production mode?
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment