first, you can debug the shell in the console until success. and you can write the shell in sh file,like this:
run.sh: export RAILS_ENV=production /usr/bin/ruby ~/1.rb ..... crontab file * * * * * sh ~/run.sh 2010/5/11 Jeffrey L. Taylor <[email protected]>: > Quoting Manish Nautiyal <[email protected]>: >> Jeffrey L. Taylor wrote: >> > Quoting Manish Nautiyal <[email protected]>: >> >> /mnt/apps/NearbyAd/current/lib/camp.rb >> >> >> > Try >> > >> > * * * * * cd /mnt/apps/NearbyAd/current; ./script/runner -e production >> > lib/camp.rb >> > >> > HTH, >> > Jeffrey >> >> Thx Jeffrey >> Its work. >> >> many many thanks > > There are several things in Rails that assumes the current working directory > is somewhere in the Rails application directory structure. For example, the > following works also: > > * * * * * cd /mnt/apps/NearbyAd/current/lib; ../script/runner -e production > camp.rb > > > Jeffrey > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

