Displaying 20 results from an estimated 1000 matches similar to: "has_too_many"
2005 Sep 11
4
[RFC] The Early Demise of Myriad (Thanks To Ruby Threads)
Hi Everyone,
I figured out this weekend that Ruby''s Thread implementation causes the Ruby/Event binding I wrote to completely stall and go dead. After reviewing the Ruby source and watching several strace runs, it''s clear that the Ruby Thread implementation uses select in a way that--while not being bad--just isn''t compatible with libevent. The second a thread is
2006 Jan 19
7
bug in has_many count?
I can submit a patch, but wanted to confirm I''m looking at this right...
The docs indicate that if you specify a has_many association with
:finder_sql, but no :counter_sql, it constructs the appropriate counter
sql by substituting the SELECT clause.
But has_many_association.rb doesn''t seem to do that -- it just passes
Base#count_by_sql the finder_sql, which doesn''t
2006 Feb 26
3
Fast inserts?
There are cases when I have to create the same record 100 times.
Is there a faster way than:
100.times{Obj.create(@params[:obj])} ?
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060226/75d1e099/attachment.html
2006 Jan 08
4
Finding memory leaks?
Where are the memory leaks and what is the way to fix them?
I''m working on a game that was fairly stable in terms the memory consumption
and it was staying at around 200MB. Recently it has gone crazy, and unless I
restart it, it goes straight up to 350-400+MB after 30 minutes-1hour.
I am using Apache 1.3+fcgi in production mode.
Also the dispatch.fcgi processes take a really high toll
2006 Jan 31
3
Random 502 Bad Gateway
I have moved my project to a dedicated server and I am getting a very
annoying behaviour.
I am able to view the site just fine when using the ip.
The name is properly resolved on my computer, however I am getting
"Bad Gateway The proxy server received an invalid response from an upstream
server."
This is simply random. The site works for several minutes, then i get this
message for some
2006 Feb 25
10
Performance issue.. after a while
Hello,
I have an project running on a dedicated server:
Debian, P4 CPU 3.00GHz, 1GB RAM,
ruby 1.8.4 (2005-12-24) [x86_64-linux],
rails (1.0.0), activerecord (1.13.2)
lighttpd-1.4.10 + fastcgi + mysql 5.0
7 dispatchers.
The project is a game, so a typical user would visit 100+ pages.
When the server is busiest, it gets 35-40k requests/hour.
For some misterious reason after a number of hours the
2006 Feb 02
4
Random (connections.c.1330) error-handler not found: /dispatch.fcgi
Hello,
Again another random occurance of a problem.
lighttpd.error.log contains lines like:
2006-02-02 05:02:00: (connections.c.1330) error-handler not found:
/dispatch.fcgi
2006-02-02 05:02:00: (connections.c.1330) error-handler not found:
/dispatch.fcgi
2006-02-02 05:02:00: (connections.c.1330) error-handler not found:
/dispatch.fcgi
2006-02-02 05:35:08: (connections.c.1330) error-handler not
2006 Jul 16
3
RJS problem
I have an odd problem while trying to use a simple rjs.
_test.rjs : page.alert "test"
test.rhtml: <script><%=render_partial(''test'')%></script>
When I am attempting to view controller/test the page comes as if it was a
text file.
So i am actually seeing:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2006 Mar 25
3
Rails and Lighttpd, hangs?
I know this is kind of a generic question. But, when hitting my
lighttpd/rails site on some of the first hits, the site hangs. I
think it has something with the lighttpd configuration, possibly
something I am missing with rails or ruby? Any ideas or how to track
this down.
fastcgi.server = (
".fcgi" => (
"0.0.0.0" => (
"socket" =>
2006 Jan 21
1
db access or @session?
Does it make sense to use the @session to store some values instead of
accessing the db on each request?
I am trying to optimize the most accessed area, a page that every visitor
would access hundreds of times daily.
Thanks,
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Apr 18
2
link_to_function onmousedown
Hi,
Is there some way to produce an anchor that looks like the following
using helpers, or should I just code it in the rhtml like this?
<a href="#" onmousedown="javascript:foo(); return false">
Thanks,
Brad
--
Bradley Mazurek
2005 Aug 19
13
Enumerations (again): Comments please
Some of my earlier questions may have hinted ever so slightly in the
direction that I''m trying to implement "enumerations". By an
enumeration here I mean a class that has a fixed number of immutable
instances, which in turn have essentially only a name and a position.
Requirements I''ve tried to meet are
- Enumeration instances should only be loaded once from the
2006 Sep 26
9
Encrypt URL Params, such as the id
Is there any easy way to encrypt the URL params that is seen in the URL.
I dont feel comfortable exposing the id of the models to the external
user.
--
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
2006 Mar 01
15
Is there a perl equivalent of .= in ruby/rails??
I want to make a for loop that concats strings onto a variable:
html .= var1 + "this is a test" + whatever
What is the syntax that does this in ruby/rails?
Also, is there a ''print'' method in ruby? Because when I try to use
render_text it will only let me use this once.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 13
2
Prototype ajax/javascript q
I''m trying to send to my application the coords x,y on an "input type
image" in a html form, but x,y variables are not present in the
POST_DATA (are not submitted). Any other field (hidden inputs) are being
sent when I click on the image input form field.
I use rails 1.0 and prototype 1.4, browsers Seamonkey
2.0, Firefox 1.x and Konqueror, Linux, and I''m just a
2000 Jun 27
1
Retrieving browser lists
I've searched the Samba docs, man pages, Using Samba, and a few other
places. I've been unable to find a way to retrieve the browse list (as in
Network Neighborhood or net view on Win32) from Samba. I'm using a RH 6.2
box running Samba 2.0.7 in a multi-subnet workgroup (which is really a
domain, but I don't have a machine trust account and I'm using security =
server). Samba is
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 Feb 28
3
[AR] #{id} namespace visibility used in finder_sql
Dears,
[Rails 1.0.0]
I''m working with a legacy schema, and around my 20+ models i''ve used
some AR constructs.
They are based on a finder_sql doing some dirty sql and using #{id}
from the ''pivot'' model for extracting data in other tables.
like :
class Division < ActiveRecord::Base
set_table_name "legacy_division"
set_primary_key
2006 Jan 17
15
legacy database and finder_sql nightmare!
This is my first rails app with a legacy database and I''m having a
terrible time getting the models set up correctly. I have an order
table that has a primary field named order_number. I have a name table
with a primary of item_number. These two tables are liked by the
item_number and the order_number, but not as you might think. If the
order_number is 2500, then each entry in
2006 Oct 30
2
It this possible: finder_sql-like behavior for belongs_to?
Guys,
I have a need to support as has_many/belongs_to relationship on a
legacy(kind of) schema. The reason I say kind of is that the schema does
have "id" columns that are used in many associations, but this particular
has_many/belongs_to association needs to support different ones.
I''ve attached to code at the end of this email. Suffice it to say I need to
use the standard