Displaying 20 results from an estimated 10000 matches similar to: "script/runner to send e-mails"
2006 Jun 12
5
Method in Model
I have a simple method in a model, to send out e-mails via the
script/runner.
def Reminder.dropoff
@messages = Reminder.find(:all, :conditions => [ "time < now()"])
@messages.each do |mes|
Mailman::deliver_send_message(mes)
end
end
However, it''s not sending e-mails.
When this exact code was dropped in a controller, it worked great... is
there
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern
matching...
In my controller, I''ll have a string that I will want to parse out to a
datetime and a message, a la Google Calendar Quick Add.
Examples:
10/30/2006 7pm message
10-30-96 7:00 pm message
10/30/2006 19:00pm message
...
You see what I''m getting at. For a v1.0 release, I CAN publish some
standards for
2007 Nov 21
0
Testing transactional updates in story runner
How do you guys test transactional updates with story runner?
I have an action that needs to update four different models:
Enrollment.transaction do
@contact.update_addresses(params[:contact_address], params
[:billing_address])
@enrollment.update_attributes!(params[:enrollment])
end
The last update_attributes! will raise ActiveRecord::RecordNotValid
if anything was
2007 Jun 07
0
Module Not Loaded by script/runner
Hello ~
I have a Model Action that I wish to call from script/runner. This
Model accesses another action in a module in the lib directory. If I
fire up script/console and execute Model.action it works perfectly,
but when I run the command via script/runner it cannot find the action
I want to call in my module.
If I run: script/runner "puts $:" The lib directory is shown, so the
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
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
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
2006 May 21
0
expiring cache fragments using script/runner
I''ve just set up caching on my site and want to expire some of fragments on
an hourly basis.
I was going to use cron and script/runner to do this.
For other fragments that I am expiring, I am using expire_fragment inside a
sweeper class, something like:
class QuestionSweeper < ActionController::Caching::Sweeper
observe Question
def after_validation_on_update(question)
2006 Jan 27
0
Cache Sweepers and runner scripts that act on models?
I created a script that I call by ''./script/runner -e production
UpdateItems.get_new_items()'', which basically calls the model Item:
Item.create(attributes...)
I''ve set up a cache sweeper which removes caches after each
create/destroy/update on Item, and it works fine when accessing
controllers via the web server, but apparently doesn''t work via runner.
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
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 Dec 28
3
NET::IMAP / Runner problems
Hello,
I have a runner script that is meant to check a mailbox using imap and
insert them into the application. The method I am using to do this was
taken directly off the rails wiki:
require ''net/imap'' # above the class, not within it
def self.check_mail
imap = Net::IMAP.new(''localhost'')
imap.authenticate(''LOGIN'',
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/.
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
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
2008 Jan 05
1
status/exit code for story runner
Hi All,
I''m trying to incorporate our stories into our build for our
cruisecrontrol.rb projects and it looks like the Story Runner always
returns a 0 (zero) no matter if the tests pass or fail.
This is in contrast to the actual and expected behavior of the spec
command which will return a 0 or a 1 depending on whether specs pass or
fail.
Am I doing something wrong with the story runner
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
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
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
2008 Jun 01
0
Railsconf and textmate bundle for Story Runner
Hey guys,
A friend and I have been working on a textmate bundle for the story runner
while up here at railsconf. It is still pretty new but we think it
already has some very helpful features that removes some of the pain
points while writing plain text stories. It is on my github account if
you want to learn more and try it out:
http://github.com/bmabey/rspec-story-tmbundle/tree/master
We are