Shelling out from an action with ``?


I’m trying to shell out (with the `` method, to call wget) from within
an action. It looks something like this:

def prepare_project
@project = Project.find_by_id(params[:id])“Exporting project…”)
wget blah blah
zip blah blah
flash[:notice] = “Exported project successfully.”
redirect_to :action => ‘export_project’, :id =>

The app hits this method and does indeed end up on export_project,
rendering that view… but it never seems to do the wget or zip stuff,
or even log! Can anyone please point me toward a solution?


For starters, instead of using wget why not use Net::HTTP? It can do
the same thing, though maybe with a bit more work on your end.

As far as zipping goes, well, does anyone else know of a usable ruby-zip
library and can point out docs or a tutorial?