similar to: Catch all errors in script/runner?

Displaying 20 results from an estimated 60000 matches similar to: "Catch all errors in script/runner?"

2007 Dec 12
3
undefined method: controller_name
With rspec 1.0.8 I have a spec in the directory: spec/units/controllers/application_controller_spec.rb require File.dirname(__FILE__) + ''/../../spec_helper'' class DummyController < ApplicationController def index raise "Prevent index from rendering" end end describe ApplicationController, "Handling errors in production", :behaviour_type =>
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 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 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/.
2006 May 11
0
rescue action doesn''t catch exception
I define rescue_action_in_public method in my application controller. But it fails to catch any exception thrown. I could catch the exception if i define rescue_action method instead of rescue_action_in_public method. Any idea why? Thanks, Andy. -- Posted via http://www.ruby-forum.com/.
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 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
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
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
2007 Oct 16
6
RailsStory runner - empty response
I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + "/helper" Story "View Home Page", %{ As a user I want to view my home page So that I can get a birds eye view of the system }, :type => RailsStory do Scenario "Publisher with no videos" do When
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