Hi all I want to run this in production mode. RAILS_ENV=production ruby script/runner lib/camp.rb in cron file. what i have done in cron file is below * * * * * RAILS_ENV=production /usr/bin/ruby /mnt/apps/NearbyAd/current/script/runner /mnt/apps/NearbyAd/current/lib/camp.rb but i didn''t get any success. /usr/bin/ruby i got from which ruby please help me. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Hi all > > I want to run this in production mode. > > RAILS_ENV=production ruby script/runner lib/camp.rb in cron file. > > what i have done in cron file is below > > * * * * * RAILS_ENV=production /usr/bin/ruby > /mnt/apps/NearbyAd/current/script/runner > /mnt/apps/NearbyAd/current/lib/camp.rb >Try * * * * * cd /mnt/apps/NearbyAd/current; ./script/runner -e production lib/camp.rb HTH, 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jeffrey L. Taylor wrote:> Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> /mnt/apps/NearbyAd/current/lib/camp.rb >> > Try > > * * * * * cd /mnt/apps/NearbyAd/current; ./script/runner -e production > lib/camp.rb > > HTH, > JeffreyThx Jeffrey Its work. many many thanks -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Jeffrey L. Taylor wrote: > > Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: > >> /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 thanksThere 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <ror-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org>:> Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> Jeffrey L. Taylor wrote: >> > Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> >> /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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jeffrey L. Taylor wrote:> Quoting Manish Nautiyal <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> /mnt/apps/NearbyAd/current/lib/camp.rb >> > Try > > * * * * * cd /mnt/apps/NearbyAd/current; ./script/runner -e production > lib/camp.rb > > HTH, > Jeffrey-- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.