Get script/runner back in Rails 3

EngineYard’s chef recipe for DelayedJob requires script/runner. To use this recipe with Rails 3 I’ve just made script/runner for Rails 3. Here is the code:

Edit: Fix for rails 3.0

Post to Twitter

. Bookmark the permalink. Both comments and trackbacks are currently closed.
  • Damien

    Wouldn’t the best idea to be to change the chef recipe instead of adding this ?

    • Philippe Creux

      Thanks for your comment Damien! We considered this solution actually. :)

      Their chef recipe creates a monit file that runs “/engineyard/bin/dj start/stop“. The dj script runs the command “script/runner -e production 'Delayed::Job.start'” or so.

      It would have been longer to create a homebrewed chef recipe + monit + dj-like than adding script/runner to our rails 3 app. As soon as they make their dj script compatible with rails 3 we can get rid of script/runner.

  • Jordan Brough

    #!/usr/bin/env bash

    rails runner "$@"

    might be a bit more robust?

  • Yuval

    Just ran into this issue after upgrading from Rails 2.3.5 to Rails 3, but unfortunately this hack doesn’t seem to have fixed the issue. I used to get “Execution failed” messages and now I just get “Does not exist.”

  • Davis Laib

    Yeah, it is too hard for Bing or Yahoo to compete with Yahoo in Search Engine market. Maybe I simply expect Fb’s ambition may make the industry far more intriguing.

  • Hi, my name is Philippe Creux.

    This blog is about Agile project management, Ruby programming and other cool things. I haven't published anything here since 2011. Find the latest and greatest on!