And you appear to be using ruby enterprise edition.  Did you (do you
have to?) install the gem specifically for REE?  I don't know how REE
handles gem installed binaries.

http://www.rubyenterpriseedition.com/faq.html

"When I run an app in Ruby Enterprise Edition, it can't find certain
libraries, but I know they're installed!"
Ruby Enterprise Edition does not look in regular Ruby's library search
paths. So any third party libraries will have to be reinstalled for
Ruby Enterprise Edition.

The library in question is probably a gem. Please use Ruby Enterprise
Edition's RubyGems (instead of the regular Ruby's RubyGems) to install
it. For example:

/opt/ruby-enterprise-X.X.X/bin/gem install some_gem_name
(assuming that you installed Ruby Enterprise Edition to "/opt/ruby-
enterprise-X.X.X")



On Jun 6, 7:50 pm, Bharat <[email protected]> wrote:
> I am trying to automate the deployment to my production server.  The
> application is hosted on Apache 2.2/Passenger/Enterprise Ruby
> environment.  I am also using Thinking Sphinx and am trying to
> automate Reindexing operation using Whenever gem that basically writes
> the crontab file.  The deployment fails because whenever command in my
> capistrano file cannot be found on production server.  Here is the
> deploy.rb file:
>
> set :rails_root, "#{File.dirname(__FILE__)}/.."
> require "#{rails_root}/vendor/plugins/thinking-sphinx/lib/
> thinking_sphinx/deploy/capistrano"
>
> set :application, "ssfilemgr"
> set :repository, "[email protected]:harishk/ssfilemgr.git"
> #set :repository, "#{us...@#{domain}:git/#{application}.git"
>
> set :user, "bruparel"
> set :runner, "bruparel"
> set :admin_runner, runner
> #default_run_options[:pty] = true
>
> set :domain, '72.14.181.189'
> role :app, domain
> role :web, domain
> role :db,  domain, :primary => true
>
> set :deploy_to, "/home/#{user}/r_work/#{application}"
>
> set :deploy_via, :remote_cache
> set :scm, "git"
> set :branch, "master"
> set :scm_verbose, true
> set :use_sudo, false
>
> namespace :deploy do
>
>   desc "Restart Application"
>   task :restart do
>     run "touch #{current_path}/tmp/restart.txt"
>   end
>
>   desc "Cleanup older revisions"
>   task :after_deploy do
>     cleanup
>   end
>
>   desc "Update the crontab file"
>   task :update_crontab, :roles => :db do
>     run "cd #{release_path} && whenever --update-crontab #
> {application}"
>   end
>
> end
>
> after "deploy:setup", "thinking_sphinx:shared_sphinx_folder"
> after "deploy:symlink", "deploy:update_crontab"
> after "deploy:restart", "thinking_sphinx:rebuild"
>
> Here is snippet of the terminal session when I run cap deploy with the
> fail message:
>
>   * executing "find /home/bruparel/r_work/ssfilemgr/releases/
> 20090607024242/public/images /home/bruparel/r_work/ssfilemgr/releases/
> 20090607024242/public/stylesheets /home/bruparel/r_work/ssfilemgr/
> releases/20090607024242/public/javascripts -exec touch -t
> 200906070242.42 {} ';'; true"
>     servers: ["72.14.181.189"]
>     [72.14.181.189] executing command
>     command finished
>   * executing `deploy:symlink'
>   * executing "rm -f /home/bruparel/r_work/ssfilemgr/current && ln -s /
> home/bruparel/r_work/ssfilemgr/releases/20090607024242 /home/bruparel/
> r_work/ssfilemgr/current"
>     servers: ["72.14.181.189"]
>     [72.14.181.189] executing command
>     command finished
>     triggering after callbacks for `deploy:symlink'
>   * executing `deploy:update_crontab'
>   * executing "cd /home/bruparel/r_work/ssfilemgr/releases/
> 20090607024242 && whenever --update-crontab ssfilemgr"
>     servers: ["72.14.181.189"]
>     [72.14.181.189] executing command
> *** [err :: 72.14.181.189] sh: whenever: not found
>     command finished
> *** [deploy:symlink] rolling back
>
> Funny thing is when I ssh into the server and execute "whenever"
> command from "current" directory it works as shown below:
>
> ssrxgrp ~/r_work/ssfilemgr/current: whenever --update-crontab
> ssfilemgr
> [write] crontab file updated
>
> Moreover, the whenever binary is in the path too as shown below:
>
> ssrxgrp ~/r_work/ssfilemgr/current: which whenever
> /opt/ruby-enterprise/bin/whenever
> ssrxgrp ~/r_work/ssfilemgr/current:
>
> and here is the $PATH environment variable:
>
> ssrxgrp ~/r_work/ssfilemgr/current: echo $PATH
> /opt/ruby-enterprise/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/
> bin:/sbin:/bin:/usr/games
>
> Why is Capistrano having trouble finding the executable then?
>
> Thanks in advance for your help.
>
> Regards,
>
> Bharat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to