I'm trying to setup a capistrano 1.4 task to start/stop solr on our
production server.  The basic setup is pretty straightforward:

  desc "SymLink /vendors/plugins/acts_as_solr/solr to /shared/solr"
  task :symlink_solr, :roles => [:app, :web] do
   run "rm -rf #{release_path}/vendor/plugins/acts_as_solr/solr"
   run "ln -nfs #{shared_path}/solr
#{release_path}/vendor/plugins/acts_as_solr/solr"
  end

  task :after_update_code, :roles => [:app, :web] do
    symlink_solr
  end

The symlinks get fine and everything appears to be working.  If I login
to my production server and run rake solr:start (standard task included
with acts_as_solr), everything works fine.

However, if I try to run the same rake task from a capistrano task, I
get an error.

  desc "Start solr"
  task :start_solr,:roles => [:app, :web] do
    run "cd #{current_path} && " +
        "#{rake} RAILS_ENV=#{rails_env} solr:start"

    sleep(10)
  end

So, running cap solr_start, I get the following error:

No such file or directory - java -Dsolr.data.dir=solr/data/production
-Djetty.port=8983 -jar start.jar

I'm at a bit of a loss since starting solr directly on the server works
just fine.

Any help would be appreciated.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to