Displaying 20 results from an estimated 800 matches similar to: "Logger::Format not defined (NameError) [NOOB]"
2005 Dec 16
2
Using logger from rails cron jobs
Hi. I''m trying to use logger from a rails cron job.
It works fine, but I''d like the standard ruby behavior of stamping each
log with date and time. How do I do this?
I''m trying:
# Set up out logging
require ''logger''
logger = Logger.new(STDERR)
logger.level = Logger::INFO
RAILS_DEFAULT_LOGGER = logger # Tell rails to log to our logger also
The
2007 Sep 10
2
Removing an AR class definition, for testing plugins
I''m writing an acts_as_* plugin and am trying to BDD it. Ideally my
specs would look like:
describe ActsAsCloneable, " basic cloning" do
load_example_classes
School.class_eval do
acts_as_cloneable
end
before(:each) do
@old_school = School.create! :name => "Baylake Pines", :city =>
"Virginia Beach", :guid => "abc123"
2007 Mar 10
2
upgrading rails to 1.2.2 giving me mongrel errors
I''m working on upgrading to rails 1.2.2 from 1.1.6 and getting the mongrel
error below in development mode. Now things seem to work fine with 1.1.6and
1.2.2 (in prod mode).
Any ideas what might cause this? Googling gave me very little to work
with. This was the closest thing i found
http://dev.rubyonrails.org/ticket/6716
I''m running Ubuntu with mongrel 1.0.1 and fastthread
2007 Jun 06
1
How to get title from a link
Hey all I have a question for ya. I want to be able to manipulate the
title of a link, so I need to know how to read the title with $().
Here is some code.
[START CODE]
<html>
<head>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript">
function whatUp()
{
var p =
2007 Mar 17
0
webrick failing with "NameError: cannot remove Object::UnknownPropertyMethod"
Hi,
I just downloaded the latest rails, and tried to run webrick. I get
this strange
set of error messages. It looks like the real error is
NameError: cannot remove Object::UnknownPropertyMethod
I never had this problem with older versions, and the ''fastcgi''
variant, running
under lighttpd runs fine. Any ideas why webrick appears to be
broken?
Thanks,
David
2006 Nov 22
4
Error when starting bgrdb
Hi,
I get this error when starting bgdrb using "rake
backgroundrb:start" (on a Mac using bgdrb 0.2.0):
/Users/gl/Projects/xxxxx/xxxxx/vendor/plugins/backgroundrb/server/lib/
backgroundrb_server.rb:33:in `format_message'': undefined method
`strftime'' for "2006-11-22T12:34:18.524572 ":String (NoMethodError)
from /usr/lib/ruby/1.8/logger.rb:320:in
2007 Jan 24
7
Ferret problems with Rails 1.2.1
Hi, I''ve just updated rails from 1.1.6 to 1.2.1 and I''m getting the
following errors whenever I load a page that uses a class that uses
ferret. I have ferret 0.10.13 and acts_as_ferret. They were working
fine before the upgrade.
#<NameError: cannot remove Object::WildcardQuery>
2007 Oct 28
4
A better way to stub out constants
Hi
Something that''s gnawing at me... to avoid using the SQLite3 gem I''m
stubbing it out like this:
before(:each) do
@database = mock("SQLite3 database")
SQLite3 = Module.new
SQLite3::Database = Class.new
SQLite3::Database.stub!(:new).and_return(@database)
end
But then it keeps nagging me:
2007 Nov 21
7
describe scope
Hi,
Googling ''RSpec describe scope'' didn''t yield much, so apologies if
this question has been dealt with.
It seem well known that a ruby class is ''visible'' between describes,
and if this is a problem then you should use some counter as prefix or
suffix:
''class Item_001; ... end''
Is there any work underway, or sheduled release where
2005 May 22
1
ActiveRecord: can not connect to mysql
Hi
I would like to write my first application with Active
Record:
this is my database table:
id PRIMAREY KEY auto_increment
german_name varchar(50)
english_name varchar(50) |
wingspan
this is my code:
=======================
#!/usr/local/bin/ruby -w
require ''rubygems''
require_gem ''activerecord'', ">= 1.10.1"
2006 Nov 10
0
Override logger for large binary data
I''ve searched high and low and played around and couldn''t figure out
how to override what the logger prints for a specific model (one that
has many columns of multi-100K blobs).
I ''tail -f log/development.log'' in a shell within emacs and it really
doesn''t like the huge lines dumped out during saves/updates.
So, I finally figured out that if I put the
2006 May 03
6
ActiveRecord and Lost Connection
This isnt totally a rails question; I am using ActiveRecord for storing
some simple values into a database. My problem; I keep gettign MySQL
Errors. On the Win32 machine it was off and on. Now on the linux
machine (ubuntu) I can'' t connect at all. I have all the password
settings correct.
My only thought, I am working with Threads and thought that might cause
the issue, but I
2006 Dec 04
1
no method error when starting backgroundrb
I just installed backgroundrb on our server. When tryin to start via
script/backgroundrb i get a no method error.
./script/backgroundrb start
/home/tom/ralf_dev/vendor/plugins/backgroundrb/server/lib/backgroundrb_server.rb:34:in
`format_message'': undefined method `strftime'' for "2006-12-04T15:53:
23.419225 ":String (NoMethodError)
from
2006 Jun 29
1
Logging in Rails
Is there any reason why active_record is overriding the method
format_message of the class logger?
--
Posted via http://www.ruby-forum.com/.
2008 Feb 19
0
Rails logger change format
Hi guys,
After few investigations I still cannot change the format of logs from
rails 2.0.2 apps.
I tried with overwriting the format_message method from Logger class and
still nothing. I know that in Rails 2.0.2 BufferedLogger is used and I
didn''t manage to change the format for this one.
What seems to be the easiest way to do that ?
Thanks in advance.
--
Posted via
2008 Feb 27
0
Activesupport error on start - extract_options
I''m trying to get Rails up and running on a new port of Ruby to
Arm/WinCE devices that I''ve been working on, built using CEGCC tools for
''mostly'' Posix compatability, rather than using the existing Ruby WinCE
binaries.
Ruby runs and is installed under \ruby in root of the device itself.
I''ve edited the following files of a default Rails 2.0.2 *zip*
2007 Apr 04
0
Webrick startup problem
I had my application running perfectly in the 1.8.2th version of ruby.
Now I have updated the version of ruby to 1.8.6(through the one-click
installer). I again installed the rails,uuid, and all other plugins.
I am able to start the application of some applications. But for this
application it is giving this error.
Can some body help me................THANKS in advance.
=> Booting WEBrick...
2010 Aug 26
2
Today: constant JSON::Parser not defined
(Using the latest 3-0-stable and rvm, and ruby-1.9.2-p0)
Yesterday everything worked, my own changes are very minor and in the
application only. Did anything change that could have caused this
problem? Unfortunately simply going back in rails alone to the
original "RC2" git-tag did not immediately help, so it may be some
other problem (on my own system only, even if I''m
2008 Jul 25
21
Problems with mock assigned to a constant
Hi all,
Initially I thought this was a bug in the built-in mocking framework(and it
still may be), but I better hash it out on the mailing list before I
file/reopen the ticket:
http://rspec.lighthouseapp.com/projects/5645/tickets/478-mocks-on-constants#ticket-478-6
I thought my example illustrated my problem, but obviously I was passing the
wrong arguments to the mock. I revised my example to
2006 Dec 08
4
Using custom stem analyzer giving mongrel errors
I''m using the custom stem analyzer:
require ''rubygems''
require ''ferret''
include Ferret
module Ferret::Analysis
class FerretAnalyzer
def initialize(stop_words = FULL_ENGLISH_STOP_WORDS)
@stop_words = stop_words
end
def token_stream(field, text)
StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),