similar to: Temporaly silencing the rails log.

Displaying 20 results from an estimated 600 matches similar to: "Temporaly silencing the rails log."

2006 Jan 19
3
Why does Object.subclasses_of ignore subclasses within modules?
ActiveSupport provides a method Object.subclasses_of, shown below: def subclasses_of(*superclasses) subclasses = [] ObjectSpace.each_object(Class) do |k| next if (k.ancestors & superclasses).empty? || superclasses.include?(k) || k.to_s.include?("::") || subclasses.include?(k) subclasses << k end subclasses end Can anyone shine some light on why
2012 Oct 02
3
[PATCH] chowning /dev/null should be guarded against
We''ve run into this problem several times and it''s not really expected that someone is going to monkey with /dev/null. So here''s a simple patch. I am not on the mailing list, so please Cc: me. --- lib/unicorn/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index cde2563..6b6cca2 100644 ---
2006 Apr 07
3
List of all Models
Anyone know a pretty way to get a list of all Models? That is, a list of all classes which inherit from ActiveRecord:Base I can''t seem to figure it out! The best I''ve got is to list the /app/models directory... but, that is *dirty*. -hampton. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Jul 01
4
Exceptions available in Ruby on Rails
Hi, Can anybody list out what are all the exceptions available in ROR? Thanks in advance... Karthik. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
Hi, I''m using an ActiveRecord::Observer to log users changing data in my application. However, I''ve noted that adding an item to a has_many relationship gets logged, but removing the item does not. That is: @product.users << user is logged, but: @product.users.delete(user) is not. I''ve dug into ActiveRecord and found that the underlying issue is that the
2008 Mar 12
12
Mongrel has crashed
Hi, my mongrel has crashed with following errors in the logfile: ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.3 available at 0.0.0.0:3000 **
2011 Feb 16
1
Forking for background processing with rails/unicorn
Hello, I''ve been working for a few days on a problem which, after tracking it down, seems to be related to unicorn. I''m hoping that somebody might be able to help with information about what''s going on. In the Rails 3 application that I support, we sometimes fork during a web request in order to do background processing behind the scenes without the user (and the
2005 Jul 26
3
Wx::Html* widgets
Hello, I''m having problems using the widgets Wx::Http*, such as Wx::HtmlWindow, Wx::HtmlEasyPrinting, etc.. The error I got is "uninitialized constant Wx::HtmlWindow". The code is correct since I''m trying to execute samples in the html/ directory. All other samples work. I can''t even see that widgets doing require ''wxruby'';
2006 Jan 05
1
Looping through all models in the application
Hello. I have an application that depends on a table/model (ModelInternationalization) that provides international translations in various languages for all the model/table and columns names as well as some other stuff (whether the column is visible on forms, dropdowns, lists, reports etc). I need to create a management interface for this translation stuff (the plaintext stuff, btw, will be
2006 Oct 24
1
Broken thread Safe connection Management on Mysql (Mysql too many connections errors)
Hi, There is an issue on socket connection with backgroundrb (rev 47) and mysql backend: after a certain number of job you reach the mysql connection limit as socket are never closed and nobody can connect to mysql anymore till you stop the backgroundrb daemon. Already reported on: http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000066.html,
2012 Apr 12
8
Background jobs with #fork
Hi I''ve migrated from Passenger to Unicorn about a week ago. It''s great. Great transparency and management, thanks for this great software! A few of my Rails applications start background jobs using Kernel#fork. Of course, the ActiveRecord connections are closed and reopened again in the parent and child processes. The child process also does its job. Unfortunately, it seems
2007 Jan 27
0
Debugging stale backgroundrb
Hi! As you might remember I''m having a problem of backgroundrb stopping calling my workers after some period of time. I tried adding logging to backgroundrb source code but it didn''t help. So, after digging through internet I''ve found several gdb tools and here''s what I''ve discovered: After attaching to a backgroundrb ruby process it turns out that it
2006 Mar 10
0
WEBrick crashing
ruby 1.8.2 (2004-12-25) [i386-mswin32] latest version of edge rails - patched to make the server work with win32 (http://dev.rubyonrails.org/ticket/4139) On some pages WEBrick is crashing with the following: d:/programming/ruby/lib/ruby/1.8/profiler.rb:27: You have a nil object when you didn''t expect it! (NoMethodError) You might have expected an instance of Array. The error occured
2006 Apr 05
9
Is eval the only way?
Hi, I''m trying to write some methods which use a parameter to represent a Class name. A very simplistic example: def foo(class_name, conditions) x = class_name.find(:all, :conditions => "#{conditions}") end Unfortunately, this does not work. The only way around this problem that I can think of is to use eval: def foo(class_name, conditions) x = eval
2006 Mar 26
4
edge and 1.8.2/1.8.4 issues
I recently upgraded to 1.8.4 to try out mongrel, and so far have been in a kind of hell where I can''t get my app working! Currently running (or trying to run): Ruby version 1.8.4 (i386-mswin32) RubyGems version 0.8.11 Rails version 1.0.0 Active Record version 1.13.2 Action Pack version 1.11.2 Action Web Service version 1.0.0 Action Mailer version 1.1.5 Active Support version
2007 Dec 19
8
Segmentation fault in Mongrel when run with --debug
I am having a problem with mongrel just stopping inside a periodically_call_remote function so I ran mongrel with debug enabled Mongrel seg faults after a few minutes The mongrel filelog shows 5 files open when this happens. Same log files that are open all the time. Wed Dec 19 15:10:21 -0700 2007 FILES OPEN BEFORE REQUEST /calibration/ackAdjustDistance --- log/mongrel_debug/objects.log: 2
2007 Oct 12
5
deciphering objects.log
Howdy -- I''ve been tracking down mem leaks (oh, the fun...), and I think there is a clue in objects.log. There are a few mentions of this file, but usually Zed saying "look at this file and it will help you". Can anyone clue me in to what the actual columns mean? 18,Float,143952,256821,112869,,, 18,String,39543,41693,2150,24.727076,55.526376,2308.000000
2008 May 18
2
Pure win32-thread library?
Hi all, Here''s my initial stab at a pure Ruby win32-thread library that doesn''t work at all. I''m not sure how to pass the start address of the arguments to the callback. I thought about Marshal, but you can''t marshal a proc. BTW, the CreateThread method in windows-pr needs to be updated for this to have any hope of success. Any ideas? Thanks, Dan #
2007 Mar 21
0
Getting the module name with ObjectSpace...
Hey :) I''m trying to create a method for making a sitemap dynamically. It works great for flat sites where you simply have your controllers in the app/controllers directory. In this case, I can extract the controller names like, @controllers ObjectSpace.subclasses_of(ActionController::Base).each do |obj| @controllers["#{obj.controller_name}"] = obj end However,
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make attachment_fu polymorphic, so you no longer need a different table and Model class for every associated attachment (Productimage, Ad_doc, etc). All you really need is one model and table to handel all your attachments - in some cases, anyway. I have the code working, but have run into one small hitch that I can''t seem to