similar to: how to call controller from script/runner

Displaying 20 results from an estimated 30000 matches similar to: "how to call controller from script/runner"

2007 Oct 03
3
manually invoking routing?
Hey folks. I have a rails controller which is filtering search results for access control. The search results are typically URLs into the rest of the rails app. I''m finding it would simplify the grotty code which is accumulating if I could manually invoke the router. That is to say, if I could send something a URI path string and get back the hash of controller, action, and params that
2007 Aug 01
1
multipart remote_form_for
I''m trying to figure out how to create an AJAXified form with remote_form_for that can submit a file upload, to no avail. Any pointers for me? - donald --~--~---------~--~----~------------~-------~--~----~ 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
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:
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
2006 Jan 27
0
Calling controller methods from runner scripts?
Is it possible (or even recommended) to call controller methods from runner scripts? It appears functional tests do this. I''ve tried, but always get an ''undefined ApplicationController'' error. thanks csn -- Posted via http://www.ruby-forum.com/.
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 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 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
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/.
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
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
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
2006 Feb 19
1
script/console & script/runner
Hello, Is it possible to call a method in a controller with script/console or script/runner? -- Jonas Elfstr?m
2007 May 31
0
script/runner permission denied
Hi, I have been running ferret for several months now, but want to make use of the new Drb functionality. So I am running Rails Stable (off the branch), Ferret 0.11.4, and the latest AAF. I have a ferret_server_yml file in my RAILS_ROOT/config folder: production: host: localhost port: 9009 pid_file: log/ferret.pid And I took the three scripts from the AAF plugin and put them into my
2006 Jul 11
0
using logger from script/runner
Can a script run by script/runner use the Rails logger? -- fxn
2006 Jun 07
0
script/runner to send e-mails
First, I have been learning, and loving, Ruby on Rails for a few weeks now, and a huge part of my initial success ans enjoyment is due to this forum... so for that, thank you. I hope to contribute regularly. Ok, I know there are related threads, but I want to get a confirmation or denial that the workflow I am about to embark on is correct. I have a db of e-mail addy''s, messages and
2006 May 26
0
render_to_string in model or script/runner?
Hey, is there a way to render a view to string in a model or is there a way to call a controller method (because there its possible to call render_to_string) in a model or externaly via script/runner ? Thx very much yo
2007 Dec 18
0
script/runner as a single instance
I am utilizing the script/runner script to launch a few models for maintenance on my application. Is there any to ensure that only a single instance of a certain process is running? I guess I could have the model check/update a flag in the db, but maybe there is an easier way? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2008 Jul 11
0
Catch all errors in script/runner?
I have a rails app that is run exclusively as a script/runner process, and I''d like to be able to catch all errors that occur in these processes in a standardized way. With a normal rails app, one can override rescue_action_in_public in ApplicationController, but I''m only using models. Is there something similar I can do? Any help is much appreciated.