Displaying 20 results from an estimated 100000 matches similar to: "Rails Logger in custom module"
2006 Nov 16
0
Rails logger doesn't log nil, Ruby logger does
Is there some reason that the Rails logger doesn''t log nil as the string
"nil", like the Ruby logger does? It is a bit confusing.
Ruby example:
$ cat log.rb
require ''logger''
logger = Logger.new(STDOUT)
logger.info "test"
logger.info true
logger.info nil
logger.info "end test"
$ ruby log.rb
I, [2006-11-15T16:45:00.348262 #2058] INFO
2008 May 21
2
Replacing ActiveRecordStore::Session with a custom model
Has anyone managed to replace ActiveRecordStore::Session with their
own model?
In the source (http://dev.rubyonrails.org/browser/trunk/actionpack/lib/
action_controller/session/active_record_store.rb) it says you can
override the default by setting
CGI::Session::ActiveRecordStore.session_class = MySessionClass
I have tried doing this in a number of ways but I get all kinds of
weird errors, as
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 Nov 17
0
custom format with BufferedLogger?
So Rails2 provides a new BufferedLogger class that is used for logging.
The old monkey-patched Logger class is deprecated.
It''s nice that the new BufferedLogger doesn''t do that weird monkey
patching thing, making it easier to sub-class for custom behavior and
set your sub-class as the logger, etc.
But oddly, BufferedLogger is not a sub-class of the Ruby logger. It''s
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to
2.2.2.
I am almost there but I have hit a problem with ActiveRecord.
Before the upgrade, the following code was working fine.
def create_root(administrator)
root = create_root_collection(self.pingee_name,
administrator,
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
2009 Sep 29
10
rails 2.3.3 upgrade shows error
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
any ideas ?
Application works fine with rails 2.1.0
Sandip
--
Ruby on Rails Developer
http://funonrails.wordpress.com
www.joshsoftware.com
http://brandpotion.com (Latest project released)
--~--~---------~--~----~------------~-------~--~----~
2007 Dec 26
2
Overriding or changing HTML generated by date_select?
Hi,
I''m looking for a way to customize the HTML forms generated by
date_select. I''m especially keen on replacing the year and possibly
day input by a simple text field, since honestly, I find listboxes for
years to be quite retarded (if I wanted client-side validation, there
would be better ways to do that instead of having people try and find
their year of birth in a list of
2009 Mar 28
2
Git and vendor/rails
This is really a git question but the problem is with rails using git and
others may have come across the problem.
I have a branch on my application''s git repository with edge rails as a
subproject checked out into vendor/rails. this allows me to keep my
application edge-compliant by checking out the branch (which creates the
rails folder in vendor), pulling the latest edge rails and
2012 Oct 10
4
How do we get the End of Line date for the gems which we are using Ruby on Rails?
Hi All,
I want to know the EOL date for the below gems for ROR. Can anyone help me
how to find the EOL dates
- authlogic
- will paginate
- oauth-plugin 0.3.14
- statistics 0.1.1
- YUI
- cucumber 0.6.4
- cucumber-rails 0.3.0
- rspec 1.3.0
- rspec-rails 1.3.2
- webrat 0.7.0
- factory-girl 1.2.4
- database_cleaner 0.5.0
- SSL requirement
- calender_select
2008 Dec 10
2
Saving data from the output window to a text file
Hi group,
I''m a complete novice who is having lots of fun discovering Ruby, Ruby
on Rails / Watir. Good bits of software.
I wanted to record the info in the output window, into a text file. I
wanted to do this in Ruby as I don''t know enough about R-o-R.
Can anyone help me out on this.
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this
2008 Apr 09
6
Using Ruby on Rails with existing database
Hi, I''m a complete newbie to this, I''m afraid. Apologies if this has
been answered elsewhere, but I''ve had a look, and can''t find the
answers I''m looking for, especially for using Rails 2.0.
We have an existing database which we would need to connect Rails to,
and the database structure is not what Rails would seem to expect.
Firstly, tables are not
2010 Apr 15
1
Using Rails.Logger in a gem in Rails 3beta3
Hi fellows!
I want to use the Rails.logger in my gem. I try the following code in
my main gem-file.
require ''rails/logger''
puts "init1"
::Rails.logger.info("hi")
puts "init2"
The funny thing is: It even don''t give me the output of puts in the
stdout of the server!
But if I remove the call to Rails.logger the puts are displayed in the
2009 Nov 17
6
after changed the tag i got the same eror
SyntaxError in Upload#index
Showing *app/views/upload/uploadfile.rhtml* where line *#10* raised:
compile error
app/views/upload/uploadfile.rhtml:10: syntax error
Extracted source (around line *#10*):
7: <% end %>
Trace of template inclusion: app/views/upload/uploadfile.rhtml
RAILS_ROOT: /home/malathi/www/upload
Application Trace <http://localhost:3000/upload#> | Framework
2007 Apr 03
0
syslog logger performance
I have the syslog logger from the rails analyzer gem installed, and
I''m curious if anyone else has used it in production and has comments
on the performance hit they took, particularly when logging to syslogd
on the same server.
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 May 25
0
TMail and logger
Hello,
I''m the creator and ror developer of vipc.it, a photographic
competition that works pretty well.
I''ve created different releases and implemented different techniques
to collect entries, from simple http to flex upload to manage big
files (up to 5/6 mb), but every solution always had disadvantages:
unresponsive server, user from many countries with old computers
(problem
2008 Feb 20
0
Testable Logger
I like the idea of having unit tests make sure what gets logged.
I found a plugin called "testable logger" at
http://code.teytek.com/rails/plugins/testable_logger/
This promises to do what I''m looking for.
But the code itself is not available through the links provided. The
author hasn''t responded to my email.
Does anyone know an alternative or has a copy of the
2009 Jun 05
15
Rails Code Indentation
Hi All,
Rails code must be readable, formatted and well indented.
I wanted to do indent code in my previous projects.
Is there any built in rails plugin/gem that can help me to
indent my existing code.
Any ideas will be really appreciated !
NOTE: Please don''t suggest editor plugins.
Thanks & Regards,
Sandip R~
--
Ruby on Rails Developer
http://sandip.sosblog.com
2007 Nov 16
1
Temporaly silencing the rails log.
Hi! I want to do what subject say. Is there any elegant way to do this:
???
# Silence the log inside the block attached to the method call.
def silence_logger
orig= nil
ObjectSpace.each_object(::Logger) do |logger|
logger.info "-" * 80
logger.info "Quieting the log..."
orig= logger.level
logger.level= ::Logger::FATAL
end
yield
2009 Mar 16
2
nested forms in rails 2.3
Hi,
Is there a simpler way to implement the view-component of nested forms
as it was done in Railscast #75 (Complex Forms Part 3) in Rails 2.3?
I''d like to add and remove the owned objects dynamically using AJAX
requests, but using f.fields_for :object do |object_form| doen''t let
me load new objects into the form - or at least I don''t fully
understand how that should