Displaying 20 results from an estimated 10000 matches similar to: "Exceptions available in Ruby on Rails"
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:
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
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
2012 Feb 06
1
using file in hdfs for data mining algorithms in r
hi all, i am new to r , i am trying to run data mining algorithms using map
reduce framework.. *
*i have few basic doubts*
*1. can i give file in hdfs to kmeans( ) ? ?I tried as
> file1 = hdfs.file("testdata/synthetic_control.data")
> isf = hdfs.read(lsf,5242880,0)
>l = kmeans(isf,2,10)
its not working.. please help
2. How to access the file in hdfs and give as input to
2007 Dec 03
4
How to remember if a div is shown or hidden after a page ref
Hi everyone, hi have a similar problem in a view:
<div id="content">...</div>
<a href="javascript:void(0)"
onClick="Effect.Toggle(''content'');">Hide/show content</a>
I would like the page to "remember" that the div has been hidden after a
page reload.
(The div comes up always visible even if it was set to hidden
2008 Mar 12
1
Garbage collection in Ruby
Hi All,
Can you give some ideas on Garbage collection in Ruby?
Thanks in advance...
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
**
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
---
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
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 Feb 20
1
how to get ROC for SVM
Hi
How can i get ROC for svm during modelling in SVM. how to plot the
values
thanks
karthik
On 2/16/06, karthi keyan <gkkarthikeyann@gmail.com> wrote:
>
> Hi
> My name is karthikeyan.
>
> I am using svm in R for my data set.
>
> my data set contain 60 finance ratio as variables and i want to classify
> into group of good and bad.
>
> I want to know
2008 May 12
1
'Stack level too deep' error
Hi,
Sometimes I am getting "Stack level too deep" exception. I have know no
idea on when I am getting and why I am getting.
Please give your suggestions.
Thanks in advance...
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
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
2008 May 11
3
radio_button_tag and default checked option
Hi, I can''t get my radio button to be checked by default, here is what I
have:
<%= f.radio_button :gender, "male", :checked => ''true'' %><p>Male</p>
<%= f.radio_button :gender, "female" %><p>Female</p>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received
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 Feb 16
1
reg cross validation in svm
Hi
My name is karthikeyan.
I am using svm in R for my data set.
my data set contain 60 finance ratio as variables and i want to classify
into group of good and bad.
I want to know how to do the crossvalidation for the svm .
first i am doing modelling and i am predict and i am calculating the
probabilities
how can i do the cross validation and how can i plot the svm for this
variables
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
2003 Sep 24
5
splitting clusters
Hi All:
I am clustering 500 genes using hclust of R. Visualizing cluster
membership becomes difficult with so many genes in each cluster...Is there
a way of printing the dendrogram in multiple pages so that I can clearly
see what is in each cluster?
Thanks in advance.
Karthi.
2011 Jan 24
2
normality and equal variance testing
I currently have a program that automates 2-way ANOVA on a series of endpoints,
but before the ANOVA is carried out I want the code to test the assumptions of
normality and equal variance and report along with each anova result in the
output file. How can I do this?
I have pasted below the code that I currently use.
library(car)
numFiles = x #