similar to: using logger from script/runner

Displaying 20 results from an estimated 100000 matches similar to: "using logger from script/runner"

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
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 Feb 19
4
is "display" a reserved name of some sort?
A view display.rhtml sees no controller state variables set in the corresponding display action. Why? -- fxn
2006 May 24
7
migrations and SQLite
I read in the instructions of Tracks that "upgrading via the rake migrate command is quite a bit more tricky currently with SQLite and SQLite3". Is there any gotcha regarding migrations and SQLite3? -- fxn
2006 Jul 14
1
error with Dates in SQL Server
An application that run without flaw last week has been reported to crash with an error that says that a conversion from char to datetime has given a date outside range. This very application runs OK today in production (fortunately :-), and the difference in both SQL Servers is just that the one where the exception has started to appear has Spanish conventions. I can''t give
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates has broken in some calls to render_component from views. I might be missing something but as far as I remember Rails updates is the only thing I''ve done in between. See the log: *** START LOG SNIPPET Start rendering component ({:params=> {:center_id=>10, :id=>25},
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 Apr 05
5
when is model() needed?
I have just some vague and thus probably wrong ideas about when to use model() in controllers, and by now I err on being redundant. I don''t post them here to avoid leaving anything that may be false in the archives. Can anyone explain exactly in which cases one should use model()? -- fxn
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers? Say user has many posts. Post controller has action add_post that receives user id, post controller find()s the user and while he is creating the post entry an administrator deletes that user in a separate session. We cannot assume the database checks foreign key integrity. How do you get that right? -- fxn
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 11
5
after_(read|find) callback?
I am pondering the possibility of encrypting/decrypting some fields in a SQLite backend on-the-fly. The point of the message is not security, I know that''s broken, but whether there''s a technique that provides on-the-fly save/read filters. Of course the solution would need to work transparently in joins, so user.posts.last.title would do the right thing if title
2006 Feb 27
1
Instance methods in runner?
I am having a devil of a time with some runner actions. I can not seem to call any instance methods on found records. Even when I strip is down to the basics: def self.deliver self.find(:all, :conditions => ["#{Message.table_name}.status = ?", ''pending''], :include => [:site, :template]).each {|m| logger.info m.is_recurring? # my method logger.info
2008 Jan 04
1
eager loading and polymorphic associations
There is a dedicated section about eager loading in the docs. A coworker discovered eager loading does not work in polymorphic associations the hard way :-) so I''ve written a patch that documents it: http://dev.rubyonrails.org/ticket/10610 There are at least a couple of tickets that implement something that would change that though: http://dev.rubyonrails.org/ticket/9640
2006 Mar 04
13
Using helpers from controllers ?
There is a solution to use helpers from controllers ? I have an error : |undefined method `content_tag''| class ApplicationController < ActionController::Base def test return content_tag("a","test") end end
2006 Feb 19
1
distributing iconv.dll
I would like to distribute Iconv for Windows with my Rails application (developing on a Mac, no experience with dlls). I threw iconv.dll and charset.dll under lib without luck. Where would I need to put them (if this is possible at all)? -- fxn PS: The reported error message is in Spanish but translated reads something like "the specified process was not found: Init_iconv".
2011 Dec 31
4
Testing Explain Logger Output
Any quick tips? I''ve been getting the SQL Server adapter up to passing for 3.2 and I wanted to test our explain printer. It will be very much like mysql2''s printer. But I think my brain is mush and my meta-fu weak at the moment and I need some help. I tried stubbing ActiveRecord::Base.logger.warn but to no avail. Any thoughts? - Ken -- You received this message because you
2006 Dec 07
17
compress and max upload size?
I am using mongrel_cluster with mod_proxy_balancer and would like to enable compression (assuming it improves throughtput) and limit file size upload. I configured mod_deflate and LimitRequestSize in Apache, but in my trials looks like the proxied calls bypass those directives (the conf goes below). Is there a way to get this? -- fxn # Adapt this .example locally, as usual. # # To be
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 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action? Thanks Frank --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 15
11
can you explain this benchmark?
I want to load about 14000 words (a subset of /usr/share/dict/words) into a MySQL table in a migration: class CreateWords < ActiveRecord::Migration def self.up create_table :words, :force => true do |t| t.column :word, :string end say_with_time ''loading words...'' do words = File.join(RAILS_ROOT, ''db'',