similar to: script/console & script/runner

Displaying 20 results from an estimated 10000 matches similar to: "script/console & script/runner"

2006 Jan 22
23
calculate users age
i know it''s probably really simple, how do i work out someone''s age if i have their d.o.b. stored as a date in my db. cheers -- Posted via http://www.ruby-forum.com/.
2006 May 31
1
runners and development/production mode
I''m using a runner script to try and send batch email update, however I get the impression that the runner is not operating in production mode and as a result it is falling foul of the system I have in place to block emails goinc out in development in testing modes. Is there some way for me to force a runner to operate in a particular mode, or even to check the mode it is operating in?
2007 Mar 26
2
Calling a controller action from script/console or runner
Is there a way to call or invoke a controller method from script/console or script/runner? The reason is that I''d like to pre-cache some of the actions on my controller. The pseudo code below is what I''d like to be able to do: class MyController < ApplicationController caches_action :test def test puts ''Hi there'' end end script/console:
2006 May 29
2
How to use script/runner
I''ve read the wiki and Agile and can''t find the answer. When using script/runner I''ve gotten simple model functions similar to the -help example to run: $script/runner ''puts Vendor.find(1).name3'' where Vendor is a model. However when I try to run a function in a controller it doesn''t work: $script/runner ''puts
2008 Oct 28
1
Script/Runner
I have a production site that has a couple of batch jobs, I have used script/runner and cron to run these jobs. This works ok for jobs that only run once overnight during off peak. I am expiring sessions older than 30 mins every 15 mins using script/runner, but I''m concerned about the hit of script/runner loading up the whole rails environment, specifically since I only have a 256MB
2009 Apr 24
3
Running in non-dev envs. with script/runner shebang setup
All, I have a script that runs script/runner via the shebang mechanism at the top o the file, like so: #!/usr/bin/env ./script/runner This works fine in development, how would I get it to run in non-development environments? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 May 26
3
once a day activity
Say I want to send out an email once a day to people who''s name is "Bob". Would I use script/runner in conjunction with cron? Or is there another cool(er) way now? Thanks, Joe
2008 Oct 22
3
Rake task vs script/runner
Hello, until now I allways used script/runner for running Rails cron jobs I wonder is there is any benefit (except not having any fake runner model in the models directory) to use a rake task instead in lib/tasks Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Jul 26
1
lesson learned: script/runner does not abort on failed require
After a fresh installation of an application, some utility scripts run with script/runner quietly aborted right after their start. No error message whatsoever, just a new shell prompt. The reason was an uninstalled dependecy, but that was difficult to determine because the load failure was not reported: % ruby script/runner ''require "foobarbaz"'' % Why
2007 Oct 05
5
DRbConnError when using script/runner
I am running ferret (0.11.4) and acts_as_ferret (stable from svn) in a rails 1.2.3 app in production using the DRb server. I recently upgraded my configuration and the method with which I start and stop the server no longer works: Here is the command I would like to use (and have used in the past) to start the aaf server: $ /Library/WebServer/rails/ccdb/current/script/runner -e production
2010 Feb 23
2
Logging and Exceptions with Script Runner
I have cron jobs that run script/runner commands and I have two questions: 1. Should logging be working when calling the logger methods from an object within the script? 2. Should Exception Notification work when an exception occurs in the script/runner? Thanks! Tom -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2006 Apr 03
5
Heavy e-mail receive
Performance experts, Normally to receive e-mails is to pipe their content to script/runner individually from a mail server, sendmail or postfix. Doesn''t this configuration run like Apache 1.3 with CGI, meaning for each e-mail a boot of the entire Rails environment and thus low scalability? Is there anything working like lighttpd-fcgi or going toward its approach? DD -- Posted via
2006 Nov 04
8
alternatives to script/runner?
I''ve been using script/runner to add and delete files from the database in response to inotify events. This works in theory, but is too slow to keep up with a large number of events in succession; I''m suspecting that the bottleneck is that script/runner has a huge startup cost. One thing I thought of was to queue inotify events, and call script/runner once a minute to clear the
2011 May 20
3
"no such file to load -- rails/commands/runner (LoadError)"
Hi, I am using ruby 1.9.2 and rails 3 for my application. I have written a bash script which I want to run in cron. If I directly run the bash file it runs. If I run it through the cron I get the following error:- "/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'': no such file to load -- rails/commands/runner (LoadError) from
2006 Mar 20
6
Rails and Offline processing
How are you guys handling threads or server processes that have to, for example, process the data in your application on a periodic basis? Cron jobs can do it and then run on the database. But, are there ways to launch threads within the rails application itself. I have heard of WebBrick ways, but I am working with lighttpd, fastcgi? (textdrive if you are really interested).
2006 Feb 16
1
runner: url_for with mailers impossible
I created a runner script to send a newsletter. I found this hack where you pass a controller and specify a helper: http://wiki.rubyonrails.org/rails/pages/HowtoUseUrlHelpersWithActionMailer But in a runner script there is no controller to pass. So, it looks like it''s impossible to use url_for in the mailer template this way. Another way around the no url_for problem is to pass the
2008 Apr 22
2
syntax error in runner.rb
ruby script/runner ''load "filename.rb"''* fails with ./script/../config/../vendor/rails/railties/lib/commands/runner.rb:47: (eval):1: compile error (SyntaxError) Rails version is 1.2.0 on Linux Any clues on what could be incorrect? Thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message
2009 Jan 21
5
Runner suddenly fails...
I have some jobs running through cron jobs and runner that suddenly starts failing. This is how it looks: from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/runner.rb:47 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from
2011 Apr 18
1
rails runner giving problem
Hi, I have a rails 2.3.8 application, which has some ruby script in scripts folder which has ran through the cron. I just upgraded my application to rails 3. My problem is I am not able found a solution to run these scripts. In Rails 2.3.8:- ruby script/runner test.rb In Rails 3:- rails runner test.rb does not working. Can anyone tell me How can I run the scripts? Thanks, Mike -- Posted
2007 Sep 03
6
blog post on story runner
Here''s an excellent blog post on Story Runner, which will be part of the next release and is undergoing active development in trunk: http://evang.eli.st/blog/2007/9/1/user-stories-with-rspec-s-story-runner