Displaying 20 results from an estimated 1000 matches similar to: "Idiom question - assertions which aren''t in tests"
2006 Feb 04
2
Associations oddity
Can anyone explain this oddity to me?
Given two classes as follows:
class Question < ActiveRecord::Base
belongs_to :category
end
class Category < ActiveRecord::Base
has_many :questions
end
I get the following:
>> q = Question.find 6789
=> #<Question:0x37e9e70 @attributes={"id"=>"6789",
2006 Sep 20
15
Why Rails + mongrel_cluster + load balancing doesn''t work for us and the beginning of a solution
We have been searching for a Rails deployment architecture which works for
us for some time. We''ve recently moved from Apache 1.3 + FastCGI to Apache
2.2 + mod_proxy_balancer + mongrel_cluster, and it''s a significant
improvement. But it still exhibits serious performance problems.
We have the beginnings of a fix that we would like to share.
To illustrate the problem, imagine a
2006 Feb 07
4
ruby-forum.com problems?
Anybody else experiencing problems accessing
ruby-forum.com ? For the past week or so I''ve mostly
not been able to access it. It either never loads, or
displays a 500 error message. I prefer it though to
direct email, or the Mailman archives.
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
2006 Sep 01
2
Configuring Mongrel logging
Is there any way to configure Mongrel''s logging? Specifically, I''d like to
get it to output to syslog. Our Rails apps already do this (via
SyslogLogger) - is there any way to persuade Mongrel to do the same?
Thanks!
--
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
MSN: paul at paulbutcher.com
AIM: paulrabutcher
Skype:
2006 Jan 21
2
Documentation for mocks?
Is there any documentation about how mock objects work in RoR,
specifically exactly how one should use the test/mocks directory. Is it
just me being incompetent searching for it, or hasn''t this been
documented yet?
Thanks in advance for your help!
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
--
Posted via
2006 Sep 18
11
Finally! Mongrel 0.3.13.4 Official (for Unix)
Hello! Today I''m announcing a "soft but official" release of Mongrel
0.3.13.4 for the Unix fans in the crowd. It''s been running stable for
quite some time now for many people, and should be great for nearly
everyone.
You can read the announce at:
http://mongrel.rubyforge.org/
This release includes new versions of mongrel_upload_progress and
mongrel_cluster.
2006 Feb 05
2
working with rails and unicode
I''m trying to get basic unicode support working using the "Iteration
A1" sample application from the "Agile Web Development With Rails"
book.
Following the "HowToUseUnicodeStrings" wiki document, I have made the
following changes:
config/environment.rb:
# Include your application configuration below
$KCODE = ''u''
require
2006 May 31
13
What are controller modules *for*?
I am aware that controllers can be placed in modules:
ruby script/generate controller modulename/controllername
But what does this buy me? Is it just a way of ensuring that my source
code is nicely arranged, or can I use the fact that a set of controllers
are all within a particular model to implement functionality common to
all of those controllers?
Why am I asking?
The app
2007 Oct 15
24
Design flaw? - num_processors, accept/close
Rails instances themselves are almost always single-threaded, whereas
Mongrel, and it''s acceptor, are multithreaded.
In a situation with long-running Rails pages this presents a problem for
mod_proxy_balancer.
If num_processors is greater than 1 ( default: 950 ), then Mongrel will
gladly accept incoming requests and queue them if its rails instance is
currently busy. So even
2006 Aug 14
14
A mock which extends rather than replaces a class?
While running tests, we would like to instrument some of the classes
under test. We still want the classes to do exactly what they currently
do, but we would like them to do more when running in the test
environment.
Clearly we can (and currently do) just extend the objects "on the fly"
where necessary, but this is a bit messy - we''d like some centralised
way to always
2006 Sep 03
18
Recommentation: Sessions and PStore
Morning Folks,
As most of you know there were a few people who had the following three
bugs:
* CLOSE_WAIT: Lots of sockets in CLOSE_WAIT state.
* 99% CPU: Mongrel''s getting "stuck" pegged at 99% CPU.
* LEAK: Memory leak.
I''ve successfully fixed these bugs or attributed them to one main cause:
pstore.
First, the memory leak was because of a bug in how the GC in Ruby
2006 Aug 09
6
gem install rails
Hi All,
I installed ruby184-20 and rubygems-0.9.0 on my computer. When I tried
to run C:\ruby>gem install rails --include-dependencies, it showed the
following message:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find actionpack (= 1.12.4) in the repository
Could any one help to solve the above
2005 Dec 30
5
HABTM with finder_sql problem (Rails bug?)
I''m building an app that needs i18n support across the entire database
(i.e. localized attributes). In order to do this I''ve created a
special HABTM join table that can be associated with _any_ other
table:
create table language_strings (
for_table varchar(255) not null,
foreign_id int not null,
language_id varchar(5) not null,
attr_name varchar(255) not null,
value text
2006 Jan 04
5
habtm recusive
I have a people table:
CREATE TABLE people (
id int(10) unsigned NOT NULL auto_increment,
first_name varchar(75) default NULL,
middle_name varchar(75) default NULL,
last_name varchar(75) default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1272 ;
and a people_people table:
CREATE TABLE people_people (
person_id int(11) unsigned NOT NULL,
2005 Dec 29
9
Single Table Inheritance
Hi all,
Quick question for STI. With the following setup:
class Company < AR::Base; end
class Firm < Company; end
Why does Firm.find(:all) return all Companies, not just those that have
type==''Firm''?
--
Alex
2005 Dec 27
3
Trouble combining :has_many, :finder_sql and :conditions to create a sub-search
I''m sure there''s something right under my nose that I''m missing. I
have two tables with two parallel one-to-many relationships. I wish to
use the :finder_sql parameter to essentially ''or'' the two foreign
keys.
What isn''t working for me is performing a ''sub-search''.
Let''s say the tables are "stores" and
2006 Jan 03
1
Another Rails blog entry out of Apress
A short entry, but good words about Rails.
http://ablog.apress.com/?p=842
--
thanks,
-pate
-------------------------
2012 Nov 24
3
Designating a new year (Sept-Aug) in R
If I have data (below) and need some help in figuring out how I can change the values of my date column, so that a year will be from September-August? So the year
1990 = September 89-August 90; 1991
= September 90-August 91, etc...
I was trying to use the if() function, but am unable to figure it out. I basically need to change the years associated with September-December to the following
2020 May 04
2
Fwd: [EXTERNAL] SNMP shutdown timing out
I meant to send this to the list but evidently only sent it to David.
Since sending it I've done a second test which shows what a successful
snmpset looks like.
First attachment, from the forwarded email, is nutout.txt. Second
attachment is snmpout.txt.
nomad
-------- Forwarded Message --------
Subject: Re: [Nut-upsuser] [EXTERNAL] SNMP shutdown timing out
Date: Mon, 4 May 2020 09:28:57
2009 Apr 28
1
help active record modeling.
Hi.
I have difficulties to model active record.
So please help my trouble.
Let''s suppose there are nations which have castles at least 1,
and there are 3 types of castles.
So I will make these tables.
NationsTable,
CastlesTable have common attributes of 3 types of castle.
CastlesATable, CastlesBTable, CastlesCTable each have its unique
attributes.
In this case how can I represent