Re: [Rails] root_path and root_url undefined

2009-12-01 Thread Darian Shimy
Not sure what is the issue is, I am running 2.3.4 and it works fine.
I do have he map.root as the first entry although I don't think that
will matter.

Can you send your routes.rb file?

Darian Shimy
--
http://www.darianshimy.com
http://twitter.com/dshimy



On Tue, Dec 1, 2009 at 5:41 PM, Matt Harrison
 wrote:
> Hi all,
>
> I've just started working on another RoR project after a couple of months
> away. I'm having trouble with named routes, specifically root_*
>
> In previous apps I've used root_path and root_url without any problems, but
> in this project (2.3.2 - the same as my last project where I used it) it
> comes up undefined.
>
> I've double and triple checking my routes.rb, and it all appears fine. I've
> defined map.root and removed index.html. I just can't think what could be
> causing this continuing problem.
>
> I had upgraded this app to 2.3.5 and thought that might have been the cause.
> I googled around for deprecation notices or anything and eventually
> regressed rails back to 2.3.2 with no change.
>
> I know I've probably missed something very simple, but it's completely
> eluding me right now. Any insights you guys could send my way would be
> appreciated.
>
> Thanks
>
> Matt
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: How do I implement this? run scheduler on one of cluster?

2009-12-01 Thread Freddy Andersen
You should code your own daemon that kicks of every min or so and this
daemon picks-up jobs and finishes these and marks them done. I think
there was a screen cast over with Ryan that shows how to implement a
simple daemon. (This way you can have multiple daemons.. )

Or you could use something like backgrounDrb as a scheduler...

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails 2.3.5 - Cannot install plugin

2009-12-01 Thread Hoang Nghiem
Thanks Niels, I created dump folder dev/null at C drive and the problem
still occur. I found a way to work around to install plugin that just copy
the plugin to the vendor folder. Any plugins that have the install hook code
can be call through rake task.

Thanks again!

2009/12/2 Niels Meersschaert 

> That would explain it.  /dev/null is a Unix feature.  It's possible the
> plugin install feature lost Windows support in 2.3.5 by hardcoding
> /dev/null.  The vast majority of Rails developers are on Macs or Linux, so I
> can't say I'm surprised.  You might be able to work around it by adding an
> empty file at c:\\dev\null, though since I don't develop on Windows, I
> can't say for sure.
>
> Niels
>
> On Dec 1, 2009, at 5:03 AM, Hoang Nghiem wrote:
>
> Hi Conrad,
>
> Here is the command I used:
>
> ruby script/plugin install git://github.com/aaronchi/jrails.git
>
> I'm using windows XP to develop.
>
> Thanks!
>
> 2009/12/1 Conrad Taylor 
>
>> On Mon, Nov 30, 2009 at 8:09 PM, hnghiem wrote:
>>
>>> I'm always get the message "Plugin not found: ["git://github.com/
>>> aaronchi/jrails.git "]" when
>>> trying to install a rails plugin, even for
>>> SVN or GIT. After google search, some people suggest that replace
>>> "git://" with "http://"; and add "/" at the end of the url. I tried and
>>> it still does not work.
>>>
>>> I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and
>>> it show the message "#>> null>". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google
>>> search a lot and still not know how to fix. Please help!
>>>
>>> Thanks!
>>>
>>
>> Hi, what's the exact command you're using to install the plugin?
>>
>> -Conrad
>>
>>
>>>
>>> --
>>>
>>> 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-t...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> rubyonrails-talk+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>>
>>>
>>
>> --
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>  --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] How do I implement this? run scheduler on one of cluster?

2009-12-01 Thread femto
Hello all,
How do I implement this? run scheduler on one of cluster?
I now have a requirement, needs to run scheduler on one of cluster?,
my app is monitor app, user will specify rules on my apps, like say,
invoke jmx function, find out the connection pools' count, if > 10,
then invoke some function. Something like that, and needs to run/check
every 3min.
So like say, rule1, run every 3min, rule2, run every 5min,
how do I ensure that I only run in one machine of my server cluster(my
monitor cluster)?
my monitor cluster will follow the standard rails deployment, deploy
multiple instances,
on multiple machines.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] root_path and root_url undefined

2009-12-01 Thread Matt Harrison
Hi all,

I've just started working on another RoR project after a couple of months
away. I'm having trouble with named routes, specifically root_*

In previous apps I've used root_path and root_url without any problems, but
in this project (2.3.2 - the same as my last project where I used it) it
comes up undefined.

I've double and triple checking my routes.rb, and it all appears fine. I've
defined map.root and removed index.html. I just can't think what could be
causing this continuing problem.

I had upgraded this app to 2.3.5 and thought that might have been the cause.
I googled around for deprecation notices or anything and eventually
regressed rails back to 2.3.2 with no change.

I know I've probably missed something very simple, but it's completely
eluding me right now. Any insights you guys could send my way would be
appreciated.

Thanks

Matt

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] so RoR does not support http BASIC authentication out of the box? is this correct?

2009-12-01 Thread Philip Hallstrom
> Just confirming, so RoR does not support http BASIC authentication out
> of the box?  is this correct?

No.  It does.

http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html

Google for those method names and you'll find tutorials on how it works.

-philip

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] so RoR does not support http BASIC authentication out of the box? is this correct?

2009-12-01 Thread Greg Hauptmann
Hi,

Just confirming, so RoR does not support http BASIC authentication out
of the box?  is this correct?

thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: error using rails_sql_views

2009-12-01 Thread db_333
Did some more digging on this and there's an issue with the gem.
you'll need to update the gem and comment out the following code:
rails_sql_views.rb:29

#unless Kernel.respond_to?(:gem)
#  Kernel.send :alias_method, :gem, :require_gem
#end

the other issue is that there is an updated version of the gem, but
it's notreleased on rubyforge.  This version takes care of the above
issue.

In either case, I now have the gem working properly


see http://github.com/aeden/rails_sql_views/issues#issue/2
for details.


On Nov 30, 11:19 am, db_333  wrote:
> rails_sql_views (0.6.1)
> Rails 2.3.4
>
> Hi,
>  I've implemented this gem and wrote a query (which includes a self
> join), and I am getting the following error
> when trying to run the db:migrate command
>
> undefined method `create_view' for
> #
>
> I'm a bit new to Rails, and I'm not sure what's missing here.  I've
> included the following in my environment file:
> gem 'rails_sql_views'
>
> Any pointers on this? we have an existing database and have a few
> views we'd really like to utilize.
>
> thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Very slow Mysql in Rails 2.3 versus Rails 2.1

2009-12-01 Thread Frederick Cheung


On Dec 1, 6:17 pm, BW  wrote:
> Well, I've come closer to tracking down the problem.  Running only
> ActiveRecord, the problem does not occur.  So I created a fresh Rails 2.3
> project and started adding the plugins I use.  Turns out rails-footnotes was
> causing the slowdown.
>
> But it's a specific call in queries_note.rb,
>
> explain = execute_without_analyzer("EXPLAIN #{query}", name)
>
> Comment this line out, and all works fine.  However, I can't find where this
> call, execute_without_analyzer,  is actually defined.  It seems like it
> might be behaving differently between Rails 2.1 and 2.3
>
That looks like someone has been using alias_method_chain - there is
no method called execute_without_analyzer. alias_method_chain renames
the original execute method to execute_without_analyzer

Fred

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Problem with activesupport version

2009-12-01 Thread Srdan Dukic
Hi,

I'm fairly new to rails development and am using Ubuntu 9.04 as my
distribution. I'm trying to get the 'authlogic_example' sample app working,
however I run into this problem when I try to install the gems neccessary.

$ sudo rake gems:install
(in /home/srdan/rails/authlogic_example)
rake aborted!
can't activate activesupport (>= 0, runtime), already activated
activesupport-2.1.0

(See full trace by running task with --trace)


The output of 'gem list' shows that I do in fact have activesupport
installed, version 2.3.4

$ sudo gem list

*** LOCAL GEMS ***

actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
authlogic (2.1.3)
mysql (2.8.1)
nifty-generators (0.3.0)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7)
rubygems-update (1.3.5)
sqlite3-ruby (1.2.5)


What exactly is causing the problem here? Is it that authlogic requires an
older version of activesupport or is it something else? Should I uninstall
the newer version of activesupport and replace it with the older version? If
so, how would I do that?

Thank you

-- 
Srđan Đukić

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Online Auction

2009-12-01 Thread Eric
I'm looking for a script or engine that can be customized.  We are
building an site that has a specialized auction as part of it's
functions.

Somethings that will be different from a regular Dutch auction are
-multiple bidders will be accepted (grouped to complete the bid) as
they will be bidding on lending and borrowing
-Auctioneer will have the right to accept or reject bids
-Auctioneer will be able to set the duration of the auction and can
close it at anytime
-Both parties can negotiate counter offers/bids
-Auction will automatically end when the total requested bid is meet

These are not features we need to be include (though any would be
nice) rather we would like to start with a base environment that can
be modified

Thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Submitting a form onDrop, parameters don't come through

2009-12-01 Thread jhaagmans
Well, it took some time, but I figured it out. element should be
element.id of course. Argh!

On 1 dec, 21:07, jhaagmans  wrote:
> Errm... That problem's fixed now, sorry. I had the form outside two
> containing TD tags, but it should have been inside that around the
> select tag. However, the parameters still don't get posted and I don't
> know what I'm doing wrong.
>
> On 1 dec, 20:57, jhaagmans  wrote:
>
> > What surprises me the most is that it submits the form (it sends a
> > POST request to the right place), but it doesn't submit form data. Why
> > is that?
>
> > I hope someone can help, I'm stuck.
>
> > On 1 dec, 15:25, jhaagmans  wrote:
>
> > > I may have been unclear about this: it does make a POST request to the
> > > action URL, but the POST data is empty. This results, of course, in
> > > the controller failing to process the data.
>
> > > On 1 dec, 13:32, jhaagmans  wrote:
>
> > > > Hi,
>
> > > > I'm trying to submit a form onDrop using Scriptaculous. I have a small
> > > > form with a multi-select box. My form is just a standard HTML form,
> > > > but it doesn't have a submit button.
>
> > > > 
> > > >   ...
> > > >   select box
> > > >   ...
> > > > 
>
> > > > My droppable element is created like this:
>
> > > > <%= drop_receiving_element 'multi_drop_'+attribute.id.to_s, :accept =>
> > > > 'group', :onDrop => "function(element) { $('multi_drop_form_#
> > > > {attribute.id.to_s}').request({parameters:{id:element}}); } " %>
>
> > > > As you can see, what I'm trying to do is submit a form and send the id
> > > > of the dragged element along with it as the id. But when I look in
> > > > Firebug, it doesn't POST at all! No id, but also no values from the
> > > > select box.
>
> > > > What am I doing wrong? Ondrop forms aren't really documented anywhere,
> > > > but I thought I figured it out!
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Submitting a form onDrop, parameters don't come through

2009-12-01 Thread jhaagmans
Errm... That problem's fixed now, sorry. I had the form outside two
containing TD tags, but it should have been inside that around the
select tag. However, the parameters still don't get posted and I don't
know what I'm doing wrong.

On 1 dec, 20:57, jhaagmans  wrote:
> What surprises me the most is that it submits the form (it sends a
> POST request to the right place), but it doesn't submit form data. Why
> is that?
>
> I hope someone can help, I'm stuck.
>
> On 1 dec, 15:25, jhaagmans  wrote:
>
> > I may have been unclear about this: it does make a POST request to the
> > action URL, but the POST data is empty. This results, of course, in
> > the controller failing to process the data.
>
> > On 1 dec, 13:32, jhaagmans  wrote:
>
> > > Hi,
>
> > > I'm trying to submit a form onDrop using Scriptaculous. I have a small
> > > form with a multi-select box. My form is just a standard HTML form,
> > > but it doesn't have a submit button.
>
> > > 
> > >   ...
> > >   select box
> > >   ...
> > > 
>
> > > My droppable element is created like this:
>
> > > <%= drop_receiving_element 'multi_drop_'+attribute.id.to_s, :accept =>
> > > 'group', :onDrop => "function(element) { $('multi_drop_form_#
> > > {attribute.id.to_s}').request({parameters:{id:element}}); } " %>
>
> > > As you can see, what I'm trying to do is submit a form and send the id
> > > of the dragged element along with it as the id. But when I look in
> > > Firebug, it doesn't POST at all! No id, but also no values from the
> > > select box.
>
> > > What am I doing wrong? Ondrop forms aren't really documented anywhere,
> > > but I thought I figured it out!
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Submitting a form onDrop, parameters don't come through

2009-12-01 Thread jhaagmans
What surprises me the most is that it submits the form (it sends a
POST request to the right place), but it doesn't submit form data. Why
is that?

I hope someone can help, I'm stuck.

On 1 dec, 15:25, jhaagmans  wrote:
> I may have been unclear about this: it does make a POST request to the
> action URL, but the POST data is empty. This results, of course, in
> the controller failing to process the data.
>
> On 1 dec, 13:32, jhaagmans  wrote:
>
> > Hi,
>
> > I'm trying to submit a form onDrop using Scriptaculous. I have a small
> > form with a multi-select box. My form is just a standard HTML form,
> > but it doesn't have a submit button.
>
> > 
> >   ...
> >   select box
> >   ...
> > 
>
> > My droppable element is created like this:
>
> > <%= drop_receiving_element 'multi_drop_'+attribute.id.to_s, :accept =>
> > 'group', :onDrop => "function(element) { $('multi_drop_form_#
> > {attribute.id.to_s}').request({parameters:{id:element}}); } " %>
>
> > As you can see, what I'm trying to do is submit a form and send the id
> > of the dragged element along with it as the id. But when I look in
> > Firebug, it doesn't POST at all! No id, but also no values from the
> > select box.
>
> > What am I doing wrong? Ondrop forms aren't really documented anywhere,
> > but I thought I figured it out!
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: bad move? - complex form with *many* observe_field's

2009-12-01 Thread chris.reis...@gmail.com
1) Depends what you have the observer do...  Sounds like you are
hitting your site every 3/4 of a second for the first hit, and 1.5
seconds after that now.  If you are doing a save every time the
observer fires.  You can write an observer to call a local function
instead of doing the AJAX save.  but they whole point of doing AJAX
saves is to send the data to the server.

2) You can observer a form..  calls a function that looks at the field
type and does different work on the change...  AKA, start a timer on
text field, or call AJAX directly on select field.  It is a simple if
else on the local JS function.

3) You could remove all existing observers and create a new observer
on every new event on a new field.  But it would be a bit complex.
maybe the onFocus() would work for everything?  Not sure.  onFocus
removers all observers, and makes a new observer for the current
field...  You would not be able to move an observer around I would
think.  But this would make it seem like you were.

Chris
cowboyonrails

On Nov 30, 8:40 am, lunaclaire  wrote:
> Thx for the responses... a couple of my own:
>
> 1) is it true that these hit my app (i.e. the server)? I asked the
> question thinking the issue would be on the client side only ala
> Chris' response... if there's no change, it doesnt seem to call the
> autosave fxn, so I dont think I'm getting the server-side hit
>
> 2) I tried observe_form first, but the issue is that I have some text
> fields that I want to observe one way (after text changes every few
> secs) and some selects I want to observe another way (only
> onchange)... but it seemed to get triggers only in whichever way I
> chose for the form, so I'm not sure this can work for my case
>
> 3) finally, not sure I asked this clearly at the start, but is there
> some way to dynamically "move" the observer (on the text field at
> least) to the currently focused field and only have one?
>
> On Nov 30, 6:52 am, "chris.reis...@gmail.com"
>
>  wrote:
> > The best way I have found to do this is to observe the form, (you can
> > observe an entire form with one observer).
>
> >http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper...
>
> > Another thing I have done i the past is have the observer fire off a
> > javaScript function, that sets a Timeout of 2 seconds (or some number)
> > and stores a value, then if the observe_form fires again, I clear the
> > last timeout, create a new time out.  This way your save function is
> > called on the server only when they user has stopped typing for 2
> > seconds.  It is a neat trick that has saved me millions of hits on my
> > server.
>
> > I have noticed that having many observers on a page can cause client
> > side performance problems.  You may not feel them on your machine, but
> > Not all machines swallow JavaScript the same.  Your clients may feel a
> > lot more performance problems than yourself on something like that.
>
> > Chris
>
> > On Nov 26, 12:19 pm, lunaclaire  wrote:
>
> > > I have a pretty complex form with many text fields and a number of
> > > selects. We let the user add multiple types of associated objects to
> > > the parent object and to edit the values for those associated objs, so
> > > the form can have something like the following number of fields on the
> > > page:
>
> > >    9 text fields + 3 selects + a*(1 text + 1 select) + b*(1 text + 1
> > > select) + c*(1 text + 1 select) + d*(1 text + 1 select) + e*(1 text +
> > > 1 select) + f*(7 text + 1 select)
>
> > > where the a, b, c, etc are the number of the diff types of assoc objs.
>
> > > Also, it's designed to have an autosave function. I've taken an
> > > approach that is working, but I'm concerned that it may not be the
> > > best, mostly from a performance aspect.
>
> > > Each of the text fields has an observe_field set up for it with
> > > a  :frequency => 1.5 (this seemed to be the best setting for this to
> > > catch rapid typing without droopping chars while the autosave is
> > > performed).
>
> > > And each of the selects observe_field() does not have the frequency
> > > set, so that it calls the autosave fxn only on change (vs when the
> > > user is scrolling over the choices).
>
> > > Anyway, does anybody see a prob having *lots* of observers like this
> > > set up on a page? Seems like there could be a prob with having that
> > > many observe_fields set up for the text fields triggering on a
> > > frequency basis.
>
> > > If so, one workaround I thought of was to leave the select observers
> > > in place and have one observe_field for the currently focused
> > > text_field to reduce the number number triggering every 1.5 secs.
>
> > > But, if that sounds good, how would I dynamically change the DOM ID of
> > > that single observer? Or kill the prev one and create a new one for
> > > the newly focused field?

--

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-t

[Rails] Invalid gem format, for every gem in rails

2009-12-01 Thread Brian
I've been trying to upgrade InstantRails2.0 to a more recent version
of rails.  I've updated gem to version 1.3.5. When I do a simple 'gem
update rails', I got the 'Invalid gem format' error for
activesupport-2.3.5.gem.  After researching it and finding a couple
threads here, I tried to delete this gem from the cache.  Still didn't
work, it just got re-loaded when installing rails.  I tried going to
version 2.3.3 of rails, since I don't need the latest and greatest,
and a thread here suggested a problem in the latest repository.

I tried manually downloading the activesupport-2.3.3.gem and
installing from that local downloaded gem.  This appeared to work, so
I downloaded rails-2.3.3.gem and tried to install this local copy.  I
continue to get the 'invalid gem format' for a different gem each
time.  Each time I manually download and 'gem install local' the
version that last reported the error, and each time I get the 'invalid
gem format' for another gem.

What's the root problem? I've just finally got rails 2.3.3 to install,
but I need to do this on another machine as well, and am really not
looking forward to doing this process again.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails 2.3.5 - Cannot install plugin

2009-12-01 Thread Niels Meersschaert
That would explain it.  /dev/null is a Unix feature.  It's possible the plugin 
install feature lost Windows support in 2.3.5 by hardcoding /dev/null.  The 
vast majority of Rails developers are on Macs or Linux, so I can't say I'm 
surprised.  You might be able to work around it by adding an empty file at 
c:\\dev\null, though since I don't develop on Windows, I can't say for sure.

Niels

On Dec 1, 2009, at 5:03 AM, Hoang Nghiem wrote:

> Hi Conrad,
> 
> Here is the command I used:
> 
> ruby script/plugin install git://github.com/aaronchi/jrails.git
> 
> I'm using windows XP to develop.
> 
> Thanks!
> 
> 2009/12/1 Conrad Taylor 
> On Mon, Nov 30, 2009 at 8:09 PM, hnghiem  wrote:
> I'm always get the message "Plugin not found: ["git://github.com/
> aaronchi/jrails.git"]" when trying to install a rails plugin, even for
> SVN or GIT. After google search, some people suggest that replace
> "git://" with "http://"; and add "/" at the end of the url. I tried and
> it still does not work.
> 
> I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and
> it show the message "# null>". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google
> search a lot and still not know how to fix. Please help!
> 
> Thanks!
> 
> Hi, what's the exact command you're using to install the plugin?
> 
> -Conrad
>  
> 
> --
> 
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 
> 
> 
> --
> 
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 
> --
> 
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




RE: [Rails] Re: accepts_nested_attributes_for and belongs_to

2009-12-01 Thread Joe McGlynn
It updates both parent and child models.  The Parent model is the order, you
can change the name of the order, add and remove children (line items), etc.
I kept the data model very simple so that the basics of the form didn't get
lost.  You can use the same setup for any Model with a has_many child
relationship.

-Original Message-
From: Claudio Poli [mailto:masterk...@gmail.com] 
Sent: Tuesday, December 01, 2009 10:20 AM
To: Ruby on Rails: Talk
Subject: [Rails] Re: accepts_nested_attributes_for and belongs_to

sorry, but I'm trying to update an attribute of a parent model..

On 1 Dic, 19:12, "Joe McGlynn"  wrote:
> I put together a sample app that shows how to do this.
>
> Details here:https://joemcglynn.wordpress.com/wp-admin/
> The project can be downloaded from
github:http://github.com/canonical/OrderItemsExample
>
>
>
> -Original Message-
> From: Claudio Poli [mailto:masterk...@gmail.com]
> Sent: Tuesday, December 01, 2009 10:08 AM
> To: Ruby on Rails: Talk
> Subject: [Rails] accepts_nested_attributes_for and belongs_to
>
> hi everyone,
> using Rails 2.3.5 I cannot update the attributes for a belonging
> object, pastie:http://pastie.org/722059
>
> ideas?
> thanks
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.



--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: accepts_nested_attributes_for and belongs_to

2009-12-01 Thread Claudio Poli
sorry, but I'm trying to update an attribute of a parent model..

On 1 Dic, 19:12, "Joe McGlynn"  wrote:
> I put together a sample app that shows how to do this.
>
> Details here:https://joemcglynn.wordpress.com/wp-admin/
> The project can be downloaded from 
> github:http://github.com/canonical/OrderItemsExample
>
>
>
> -Original Message-
> From: Claudio Poli [mailto:masterk...@gmail.com]
> Sent: Tuesday, December 01, 2009 10:08 AM
> To: Ruby on Rails: Talk
> Subject: [Rails] accepts_nested_attributes_for and belongs_to
>
> hi everyone,
> using Rails 2.3.5 I cannot update the attributes for a belonging
> object, pastie:http://pastie.org/722059
>
> ideas?
> thanks
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Very slow Mysql in Rails 2.3 versus Rails 2.1

2009-12-01 Thread BW
Well, I've come closer to tracking down the problem.  Running only
ActiveRecord, the problem does not occur.  So I created a fresh Rails 2.3
project and started adding the plugins I use.  Turns out rails-footnotes was
causing the slowdown.

But it's a specific call in queries_note.rb,

explain = execute_without_analyzer("EXPLAIN #{query}", name)

Comment this line out, and all works fine.  However, I can't find where this
call, execute_without_analyzer,  is actually defined.  It seems like it
might be behaving differently between Rails 2.1 and 2.3

Brett

On Tue, Dec 1, 2009 at 2:25 AM, Frederick Cheung  wrote:

>
>
> On Nov 30, 7:02 pm, BW  wrote:
>
> > The reason I think this is a Rails bug is the fact that if I run the code
> on
> > Rails 2.1, there isn't a problem.  Using Rails 2.3, with the same mysql
> gem
> > and mysql server, resources are not getting freed, causing constant
> garbage
> > collection.
> >
> Sounds promising. (although looking at the source, store_result_count
> should be decremented when the ruby garbage collector eventually
> collects the object). Can you reduce your example to a little script
> that just uses active_record  (ie outside of a rails app)
>
> Fred
> > Has anyone seen this, or know how to fix it?
> >
> > Thanks, Brett
> >
> >
> >
> > On Mon, Nov 30, 2009 at 10:10 PM, BW  wrote:
> > > Fred,
> >
> > > Thanks for the suggestion.  I tried it out, but it didn't help.  I
> pushed
> > > pool up to 150 and wait_timeout to 1, no real change.
> >
> > > I'm really stuck with this.  And the performance is so bad that it's
> > > extremely painful to do any work on the app.  Let me know if you have
> any
> > > other ideas.
> >
> > > Brett
> >
> > > On Mon, Nov 30, 2009 at 2:10 PM, Frederick Cheung <
> > > frederick.che...@gmail.com> wrote:
> >
> > >> On Nov 30, 3:28 am, BW  wrote:
> > >> > Fred,
> >
> > >> > I'm using the default, the CookieStore.
> >
> > >> That's fine. I ran into an issue because of a database store that
> > >> wasn't activerecord store. The issue was that the session store wasn't
> > >> returning connections to the connection pool, so after a few normal
> > >> page loads all of the connections are marked as busy and you start
> > >> having to wait for timeouts before subsequent actions can get a
> > >> database connection.
> >
> > >> If this is the problem then reducing wait_timeout or increasing the
> > >> pool size (in database.yml - see
> >
> > >>http://rubyclub.com.ua/doc/api-rails-2.2/classes/ActiveRecord/Connect.
> ..
> > >> )
> > >> will delay the onset of the problem (this isn't a fix though - you
> > >> need to find what is leaking connections)
> >
> > >> Fred
> >
> > >> > On Mon, Nov 30, 2009 at 3:53 AM, Frederick Cheung <
> >
> > >> > frederick.che...@gmail.com> wrote:
> >
> > >> > > On Nov 29, 6:58 pm, BW  wrote:
> > >> > > > I'm finally upgrading one of my apps to Rails 2.3.5 from 2.1.
>  One
> > >> thing
> > >> > > > I've noticed is that I'm getting terrible performance with MySQL
> > >> under
> > >> > > Rails
> > >> > > > 2.3.  The 2.3 version runs 10x slower than the 2.1 version.
>  Same
> > >> > > database,
> > >> > > > almost the same code, different version of Rails.
> >
> > >> > > what session store are you using ?
> >
> > >> > > Fred
> >
> > >> --
> >
> > >> 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-t...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> rubyonrails-talk+unsubscr...@googlegroups.com e...@googlegroups.com>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




RE: [Rails] accepts_nested_attributes_for and belongs_to

2009-12-01 Thread Joe McGlynn
I put together a sample app that shows how to do this.

Details here: https://joemcglynn.wordpress.com/wp-admin/
The project can be downloaded from github:
http://github.com/canonical/OrderItemsExample


-Original Message-
From: Claudio Poli [mailto:masterk...@gmail.com] 
Sent: Tuesday, December 01, 2009 10:08 AM
To: Ruby on Rails: Talk
Subject: [Rails] accepts_nested_attributes_for and belongs_to

hi everyone,
using Rails 2.3.5 I cannot update the attributes for a belonging
object, pastie: http://pastie.org/722059

ideas?
thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.



--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] accepts_nested_attributes_for and belongs_to

2009-12-01 Thread Claudio Poli
hi everyone,
using Rails 2.3.5 I cannot update the attributes for a belonging
object, pastie: http://pastie.org/722059

ideas?
thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] adding observers from plugin

2009-12-01 Thread Raphael Bauduin
Hi,

What's the best way to add observers from a plugin?
Replicating the behaviour of rails for adding a plugin or
http://github.com/zilkey/active_model_listener or is there another
solution?

Thanks

Raphaël

-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rjs text field replace_html issue

2009-12-01 Thread Chris Habgood
top posting?

On Tue, Dec 1, 2009 at 10:57 AM, Colin Law  wrote:

> 2009/12/1 Chris Habgood :
> > Yes I know that is why I am here.
>
> You know what? By top posting we don't know what you are referring to.
>
> Colin
>
> > Is there something incorrect about this code?
> > <%= text_field :name,"customer...@company.id}",:size => '6' %>
> > The html output is below in firebug.
> >
> > 
> >>> 
> >>> NF063
> >>> 
> >
> > On Tue, Dec 1, 2009 at 7:24 AM, Johan De Klerk 
> wrote:
> >>
> >> Shouldn't it be more like this:
> >>
> >>  >> value="NF063">
> >>
> >> On Mon, Nov 30, 2009 at 10:30 PM, Chris Habgood 
> >> wrote:
> >>>
> >>> ok this code in the view:
> >>> <%= text_field :name,"customer...@company.id}",:size => '6' %>
> >>> I do an rjs.replace_html on the div and I get nothing in the text
> field.
> >>> When I go to firebug I see this:
> >>> 
> >>> >> 
> >>> >> NF063
> >>> >> 
> >>> As you can see the value is there just not in the actual text box.
> >>>
> >>> On Mon, Nov 30, 2009 at 2:25 PM, Colin Law 
> >>> wrote:
> 
>  2009/11/30 Me :
>  > anybody?
>  >
>  > On Nov 29, 2:11 pm, Me  wrote:
>  >> This is what firebug is showing for the text_field:
>  >>
>  >> 
>  >> 
>  >> NF063
>  >> 
>  >>
>  >> Code:
>  >> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>  >>
>  >> Why is there a "/input".  when I do an html_replace it puts  the
>  >> value
>  >> in there somwhere but never shows up.  but as you can see from the
>  >> firebug output it is there somewhere.
>  >>
>  >> Not sure what is going on?  any ideas>
> 
>  I suspect the reason you have not had a reply is that most people have
>  not the foggiest idea what you are trying to do or what your question
>  is.  That certainly applies to me.  Perhaps you could explain what you
>  are trying to do, how you are trying to do it, and what is going
>  wrong.
> 
>  Colin
> 
>  --
> 
>  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-t...@googlegroups.com.
>  To unsubscribe from this group, send email to
>  rubyonrails-talk+unsubscr...@googlegroups.com
> .
>  For more options, visit this group at
>  http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 
> >>>
> >>> --
> >>>
> >>> 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@googlegroups.com
> .
> >>> To unsubscribe from this group, send email to
> >>> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/rubyonrails-talk?hl=en.
> >>
> >> --
> >>
> >> 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-t...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/rubyonrails-talk?hl=en.
> >
> > --
> >
> > 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-t...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > rubyonrails-talk+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/rubyonrails-talk?hl=en.
> >
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rjs text field replace_html issue

2009-12-01 Thread Colin Law
2009/12/1 Chris Habgood :
> Yes I know that is why I am here.

You know what? By top posting we don't know what you are referring to.

Colin

> Is there something incorrect about this code?
> <%= text_field :name,"customer...@company.id}",:size => '6' %>
> The html output is below in firebug.
>
> 
>>> 
>>> NF063
>>> 
>
> On Tue, Dec 1, 2009 at 7:24 AM, Johan De Klerk  wrote:
>>
>> Shouldn't it be more like this:
>>
>> > value="NF063">
>>
>> On Mon, Nov 30, 2009 at 10:30 PM, Chris Habgood 
>> wrote:
>>>
>>> ok this code in the view:
>>> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>>> I do an rjs.replace_html on the div and I get nothing in the text field.
>>> When I go to firebug I see this:
>>> 
>>> >> 
>>> >> NF063
>>> >> 
>>> As you can see the value is there just not in the actual text box.
>>>
>>> On Mon, Nov 30, 2009 at 2:25 PM, Colin Law 
>>> wrote:

 2009/11/30 Me :
 > anybody?
 >
 > On Nov 29, 2:11 pm, Me  wrote:
 >> This is what firebug is showing for the text_field:
 >>
 >> 
 >> 
 >> NF063
 >> 
 >>
 >> Code:
 >> <%= text_field :name,"customer...@company.id}",:size => '6' %>
 >>
 >> Why is there a "/input".  when I do an html_replace it puts  the
 >> value
 >> in there somwhere but never shows up.  but as you can see from the
 >> firebug output it is there somewhere.
 >>
 >> Not sure what is going on?  any ideas>

 I suspect the reason you have not had a reply is that most people have
 not the foggiest idea what you are trying to do or what your question
 is.  That certainly applies to me.  Perhaps you could explain what you
 are trying to do, how you are trying to do it, and what is going
 wrong.

 Colin

 --

 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-t...@googlegroups.com.
 To unsubscribe from this group, send email to
 rubyonrails-talk+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/rubyonrails-talk?hl=en.


>>>
>>> --
>>>
>>> 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-t...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> rubyonrails-talk+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>> --
>>
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] error upgrading InstantRails on WinXP, 'could not find rails gem locally or in a repository'

2009-12-01 Thread Brian
I'm trying to upgrade to the latest version of rails.  I've been
happily using InstantRails2-0 for awhile and it's been great.
However, I've hit problems trying to upgrade.  I get the error in the
subject when I do 'gem install rails'.

I've read the Rails Wiki about upgrading rails and it doesn't have any
info on this error. The Rails Wiki said I needed to first do
update_rubygems, and it appears I was able to do that successfully. My
ruby version is 1.8.6. I googled this particular error and got a few
hits about making sure the gem sources included gems.rubyonrails.org,
which mine does.

I also found an article that suggested I download the latest rails
from github, which I also tried.

Turns out the gem update didn't work, after I checked my gem version
and found it was 1.2.  When I do 'gem install rubygems-update', I get
the same error:

'could not find gem rubygems-update locally or in a repository'

What am I doing wrong?

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] named_scope with at least one association

2009-12-01 Thread Jeff Blasius
How would I write a named_scope that checks if the parent has at least
one associated child?

For example,
class Post < ActiveRecord::Base
  has many :comments

  named_scope :commented_on, :conditions => "comments.count > 0"


class Comment < ActiveRecord::Base
  belongs_to :post



Thanks,
jeff

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rjs text field replace_html issue

2009-12-01 Thread Chris Habgood
Yes I know that is why I am here.
Is there something incorrect about this code?

<%= text_field :name,"customer...@company.id}",:size => '6' %>

The html output is below in firebug.



>> 
>> NF063
>> 

On Tue, Dec 1, 2009 at 7:24 AM, Johan De Klerk  wrote:

> Shouldn't it be more like this:
>
>  value="NF063">
>
> On Mon, Nov 30, 2009 at 10:30 PM, Chris Habgood wrote:
>
>> ok this code in the view:
>>
>> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>>
>> I do an rjs.replace_html on the div and I get nothing in the text field.
>>
>> When I go to firebug I see this:
>>
>> 
>> >> 
>> >> NF063
>> >> 
>>
>> As you can see the value is there just not in the actual text box.
>>
>> On Mon, Nov 30, 2009 at 2:25 PM, Colin Law wrote:
>>
>>> 2009/11/30 Me :
>>> > anybody?
>>> >
>>> > On Nov 29, 2:11 pm, Me  wrote:
>>> >> This is what firebug is showing for the text_field:
>>> >>
>>> >> 
>>> >> 
>>> >> NF063
>>> >> 
>>> >>
>>> >> Code:
>>> >> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>>> >>
>>> >> Why is there a "/input".  when I do an html_replace it puts  the value
>>> >> in there somwhere but never shows up.  but as you can see from the
>>> >> firebug output it is there somewhere.
>>> >>
>>> >> Not sure what is going on?  any ideas>
>>>
>>> I suspect the reason you have not had a reply is that most people have
>>> not the foggiest idea what you are trying to do or what your question
>>> is.  That certainly applies to me.  Perhaps you could explain what you
>>> are trying to do, how you are trying to do it, and what is going
>>> wrong.
>>>
>>> Colin
>>>
>>> --
>>>
>>> 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-t...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> rubyonrails-talk+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>>
>>>
>>  --
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>  --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Cucumber + ajax + error

2009-12-01 Thread Abhishek shukla
Ok I came to know where I was getting wrong.

   Then "a" invitation message should be sent to "ab...@example.com"

The "a" should be in capital. "A"

Then "A" invitation message should be sent to "ab...@example.com"

:)

Thanks
Abhishek

On 12/1/09, Abhishek shukla  wrote:
> Hello Satyajit/clemens,
> Thanks for your reply.
>
> On the controller side once the request is completed
> I am doing
>
> render :update do |page|
> flash[:notice] = "Invitation sent successfully to #...@object.email}"
> page.replace_html "something", :partial => "some_partial"
> end
>
> *So this works fine when I am testing it on a browser. but it get failed
> when I do the same thing with cucumber.
>
> something.feature* -->
> Scenario: something
>Given blah blah blah
>And I fill in "name" with "abhis"
>And I fill in "email" with "ab...@example.com"
>And I press "Add"
>Then a invitation message should be sent to "ab...@example.com"
>
> *something_steps.rb
>
> *Then /^a invitation message should be sent to "([^\"]*)"$/ do |email|
>   And "I should see \"Invitation sent successfully to #{email}\""
> end*
> *
> Thanks for any help.
>
> Thanks
> Abhis
>
> On Tue, Dec 1, 2009 at 12:40 PM, Clemens  wrote:
>
>> Are you using Webrat::Selenium, watir or selenium?
>> Plain webrat won't suffice as you can't emulate javascript (including
>> the ajax callback)...
>>
>> On 30 Nov., 13:55, Abhishek shukla  wrote:
>> > Hello Friends,
>> >
>> > The following error I am getting when Testing the app
>> >
>> > Then a invitation message should be sent to "x...@example.com"
>> #
>> > features/step_definitions/office_staff_steps.rb:5
>> > expected the following element's content to include "Invitation sent
>> > successfully":
>> > window.location.href = "/office_staffs";
>> > (Spec::Expectations::ExpectationNotMetError)
>> >
>> > Then /^a invitation message should be sent to "([^\"]*)"$/ do |arg1|
>> >   And "I should see \"Invitation sent successfully\""
>> > end
>> >
>> > And the same is working fine on the browser.
>> >
>> > Let me know if someone has the same problem.
>> >
>> > Thanks
>> > Abhis
>>
>> --
>>
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Submitting a form onDrop, parameters don't come through

2009-12-01 Thread jhaagmans
I may have been unclear about this: it does make a POST request to the
action URL, but the POST data is empty. This results, of course, in
the controller failing to process the data.

On 1 dec, 13:32, jhaagmans  wrote:
> Hi,
>
> I'm trying to submit a form onDrop using Scriptaculous. I have a small
> form with a multi-select box. My form is just a standard HTML form,
> but it doesn't have a submit button.
>
> 
>   ...
>   select box
>   ...
> 
>
> My droppable element is created like this:
>
> <%= drop_receiving_element 'multi_drop_'+attribute.id.to_s, :accept =>
> 'group', :onDrop => "function(element) { $('multi_drop_form_#
> {attribute.id.to_s}').request({parameters:{id:element}}); } " %>
>
> As you can see, what I'm trying to do is submit a form and send the id
> of the dragged element along with it as the id. But when I look in
> Firebug, it doesn't POST at all! No id, but also no values from the
> select box.
>
> What am I doing wrong? Ondrop forms aren't really documented anywhere,
> but I thought I figured it out!

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails/JRuby WAR deployment and Migrations

2009-12-01 Thread Liu Lantao
rake db:schema:load instead of rake db:migrate in your production server.

On Fri, Nov 27, 2009 at 12:44 PM, Hassan Schroeder <
hassan.schroe...@gmail.com> wrote:

> On Thu, Nov 26, 2009 at 11:33 AM, Conrad Taylor 
> wrote:
>
> > Michael, why don't you simply use the glassfish gem for deployment?
>
> It's not always suitable, especially if you have an existing Tomcat
> installation with other non-JRuby apps.
>
> > In any cade, if you're trying to update the schema on the production
> > machine, the you can simply do the following:
> >
> > rake db:migrate RAILS_ENV=production
>
> No, you can't; that's the whole point -- none of those rake tasks are
> packaged with the WAR file.
>
> The legacy app I inherited uses Capistrano to check out and deploy
> a JRuby app in standard Rails format, which is useful for running
> migrations, scripts via cron jobs, etc., and then builds and deploys
> the WAR file from there.
>
> It seems a little redundant, but it works :-)
>
> FWIW,
> --
> Hassan Schroeder  hassan.schroe...@gmail.com
> twitter: @hassan
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>


-- 
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: pass parameters through link_to in a list

2009-12-01 Thread Liu Lantao
use
@car = Car.create( :name => params[:car])  ,

or
@car = Car.find_or_create_by_name(params[:car])
if you don't want duplicate items.

On Tue, Dec 1, 2009 at 3:34 AM, charlene cassar wrote:

> I didn't add the routing properly :S
>
>
> Now that i'm in my car controller, I want to call a view in the user views.
> How do i go from the controller to the view???
>
>
> Thanks
>
> 2009/11/30 lancecarl...@gmail.com 
>
> cell.name ? cell is the object, so .to_s method is going to print out
>> the object summary
>>
>> On Nov 29, 10:26 pm, Me  wrote:
>> > What is not working?
>> >
>> > On Nov 29, 3:40 pm, Char  wrote:
>> >
>> >
>> >
>> > > Hello
>> >
>> > > I have the following situation
>> > > This is my controller:
>> >
>> > > def addcar@car = Car.new(params[:car])  render :action
>> > > => "list"  endthis is my view: <%(@allcars).each do |cell|%>
>> >
>> > > <%= link_to cell.to_s, :controller => "car", :action => "addcar", :car
>> > > => cell.to_s %>
>> >
>> > > <%end %>
>> >
>> > > In the link_to statement I want to pass cell.to_s to the controller.
>> > > how can i do that please? THe cell.to_s is just a string but I want it
>> > > to be the name of the car object (car.Name)
>> >
>> > > In other words I want to pass "Honda" to the controller so that I can
>> > > save this to the cars table
>> > > IdName
>> > > (Autogenerated)   Honda
>> > > (Autogenerated)   Mercedes
>> >
>> > > etc
>>
>> --
>>
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>>
>  --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>



-- 
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rjs text field replace_html issue

2009-12-01 Thread Johan De Klerk
It's still pretty unclear exactly what you are trying to achieve...

Personally I do not use RJS all that much. It tends to get messy.

On Tue, Dec 1, 2009 at 3:24 PM, Johan De Klerk  wrote:

> Shouldn't it be more like this:
>
>  value="NF063">
>
> On Mon, Nov 30, 2009 at 10:30 PM, Chris Habgood wrote:
>
>> ok this code in the view:
>>
>> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>>
>> I do an rjs.replace_html on the div and I get nothing in the text field.
>>
>> When I go to firebug I see this:
>>
>> 
>> >> 
>> >> NF063
>> >> 
>>
>> As you can see the value is there just not in the actual text box.
>>
>> On Mon, Nov 30, 2009 at 2:25 PM, Colin Law wrote:
>>
>>> 2009/11/30 Me :
>>> > anybody?
>>> >
>>> > On Nov 29, 2:11 pm, Me  wrote:
>>> >> This is what firebug is showing for the text_field:
>>> >>
>>> >> 
>>> >> 
>>> >> NF063
>>> >> 
>>> >>
>>> >> Code:
>>> >> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>>> >>
>>> >> Why is there a "/input".  when I do an html_replace it puts  the value
>>> >> in there somwhere but never shows up.  but as you can see from the
>>> >> firebug output it is there somewhere.
>>> >>
>>> >> Not sure what is going on?  any ideas>
>>>
>>> I suspect the reason you have not had a reply is that most people have
>>> not the foggiest idea what you are trying to do or what your question
>>> is.  That certainly applies to me.  Perhaps you could explain what you
>>> are trying to do, how you are trying to do it, and what is going
>>> wrong.
>>>
>>> Colin
>>>
>>> --
>>>
>>> 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-t...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> rubyonrails-talk+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>>
>>>
>>  --
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rjs text field replace_html issue

2009-12-01 Thread Johan De Klerk
Shouldn't it be more like this:



On Mon, Nov 30, 2009 at 10:30 PM, Chris Habgood  wrote:

> ok this code in the view:
>
> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>
> I do an rjs.replace_html on the div and I get nothing in the text field.
>
> When I go to firebug I see this:
>
> 
> >> 
> >> NF063
> >> 
>
> As you can see the value is there just not in the actual text box.
>
> On Mon, Nov 30, 2009 at 2:25 PM, Colin Law  wrote:
>
>> 2009/11/30 Me :
>> > anybody?
>> >
>> > On Nov 29, 2:11 pm, Me  wrote:
>> >> This is what firebug is showing for the text_field:
>> >>
>> >> 
>> >> 
>> >> NF063
>> >> 
>> >>
>> >> Code:
>> >> <%= text_field :name,"customer...@company.id}",:size => '6' %>
>> >>
>> >> Why is there a "/input".  when I do an html_replace it puts  the value
>> >> in there somwhere but never shows up.  but as you can see from the
>> >> firebug output it is there somewhere.
>> >>
>> >> Not sure what is going on?  any ideas>
>>
>> I suspect the reason you have not had a reply is that most people have
>> not the foggiest idea what you are trying to do or what your question
>> is.  That certainly applies to me.  Perhaps you could explain what you
>> are trying to do, how you are trying to do it, and what is going
>> wrong.
>>
>> Colin
>>
>> --
>>
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>>
>  --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Peter De Berdt

On 01 Dec 2009, at 13:45, Trausti Thor Johannsson wrote:

> It consumes less memory if I don't create thumbnails.

OK, let's go one step further then and boil it down to RMagick (and  
not ImageMagick): install the mini_magick gem and change the thumbnail  
processor to minimagick explicitly and look at memory consumption.  
Since Minimagick uses the command line to process images, you should  
see no significant memory usage increase in your Rails instance. Also  
keep an eye on the total memory usage on your server and whether the  
imagemagick process stays around after the file has been processed  
(mogrify), it shouldn't.


Best regards

Peter De Berdt

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Cucumber + ajax + error

2009-12-01 Thread Abhishek shukla
Hello Satyajit/clemens,
Thanks for your reply.

On the controller side once the request is completed
I am doing

render :update do |page|
flash[:notice] = "Invitation sent successfully to #...@object.email}"
page.replace_html "something", :partial => "some_partial"
end

*So this works fine when I am testing it on a browser. but it get failed
when I do the same thing with cucumber.

something.feature* -->
Scenario: something
   Given blah blah blah
   And I fill in "name" with "abhis"
   And I fill in "email" with "ab...@example.com"
   And I press "Add"
   Then a invitation message should be sent to "ab...@example.com"

*something_steps.rb

*Then /^a invitation message should be sent to "([^\"]*)"$/ do |email|
  And "I should see \"Invitation sent successfully to #{email}\""
end*
*
Thanks for any help.

Thanks
Abhis

On Tue, Dec 1, 2009 at 12:40 PM, Clemens  wrote:

> Are you using Webrat::Selenium, watir or selenium?
> Plain webrat won't suffice as you can't emulate javascript (including
> the ajax callback)...
>
> On 30 Nov., 13:55, Abhishek shukla  wrote:
> > Hello Friends,
> >
> > The following error I am getting when Testing the app
> >
> > Then a invitation message should be sent to "x...@example.com"
> #
> > features/step_definitions/office_staff_steps.rb:5
> > expected the following element's content to include "Invitation sent
> > successfully":
> > window.location.href = "/office_staffs";
> > (Spec::Expectations::ExpectationNotMetError)
> >
> > Then /^a invitation message should be sent to "([^\"]*)"$/ do |arg1|
> >   And "I should see \"Invitation sent successfully\""
> > end
> >
> > And the same is working fine on the browser.
> >
> > Let me know if someone has the same problem.
> >
> > Thanks
> > Abhis
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
It consumes less memory if I don't create thumbnails.


Trausti

On Tue, Dec 1, 2009 at 12:52 PM, Peter De Berdt
 wrote:
> Pfew, that's one Rails instance just eating more and more memory
> indeed. Have you been able to boil it down to RMagick itself.
> Otherwise I would suggest leaving thumbnailing out for a second and
> just saving the uploaded file to see if it is in fact the thumbnailing
> that eats your memory. We can work our way down from there.
>
>
> On 01 Dec 2009, at 11:56, Trausti Thor Johannsson wrote:
>
>> Before
>> - Passenger processes -
>> PID    VMSize    Private  Name
>> ---
>> 14530  16.6 MB   0.5 MB
>> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
>> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/bin/passenger-spawn-server
>> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
>> 14531  100.8 MB  8.8 MB   Passenger spawn server
>> 22565  191.2 MB  7.7 MB   Passenger ApplicationSpawner:
>> /services/apache/example.com
>> 22567  193.3 MB  7.8 MB   Rails: /services/apache/example.com
>> ### Processes: 4
>> ### Total private dirty RSS: 24.75 MB
>>
>> after 1 picture
>>
>> - Passenger processes -
>> PID    VMSize    Private  Name
>> ---
>> 14530  16.6 MB   0.5 MB
>> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
>> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/bin/passenger-spawn-server
>> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
>> 14531  100.8 MB  8.8 MB   Passenger spawn server
>> 22565  191.2 MB  17.9 MB  Passenger ApplicationSpawner:
>> /services/apache/example.com
>> 22567  286.0 MB  82.9 MB  Rails: /services/apache/example.com
>> ### Processes: 4
>> ### Total private dirty RSS: 110.11 MB
>>
>> picture 2
>>
>> - Passenger processes --
>> PID    VMSize    Private   Name
>> 
>> 14530  16.6 MB   0.5 MB
>> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
>> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/
>> passenger-2.2.7/bin/passenger-spawn-server
>> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
>> 14531  100.8 MB  8.8 MB    Passenger spawn server
>> 22565  191.2 MB  23.3 MB   Passenger ApplicationSpawner:
>> /services/apache/example.com
>> 22567  317.6 MB  120.0 MB  Rails: /services/apache/example.com
>> ### Processes: 4
>> ### Total private dirty RSS: 152.59 MB
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Submitting a form onDrop, parameters don't come through

2009-12-01 Thread jhaagmans
Hi,

I'm trying to submit a form onDrop using Scriptaculous. I have a small
form with a multi-select box. My form is just a standard HTML form,
but it doesn't have a submit button.


  ...
  select box
  ...


My droppable element is created like this:

<%= drop_receiving_element 'multi_drop_'+attribute.id.to_s, :accept =>
'group', :onDrop => "function(element) { $('multi_drop_form_#
{attribute.id.to_s}').request({parameters:{id:element}}); } " %>

As you can see, what I'm trying to do is submit a form and send the id
of the dragged element along with it as the id. But when I look in
Firebug, it doesn't POST at all! No id, but also no values from the
select box.

What am I doing wrong? Ondrop forms aren't really documented anywhere,
but I thought I figured it out!

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Peter De Berdt
Pfew, that's one Rails instance just eating more and more memory  
indeed. Have you been able to boil it down to RMagick itself.  
Otherwise I would suggest leaving thumbnailing out for a second and  
just saving the uploaded file to see if it is in fact the thumbnailing  
that eats your memory. We can work our way down from there.


On 01 Dec 2009, at 11:56, Trausti Thor Johannsson wrote:

> Before
> - Passenger processes -
> PIDVMSizePrivate  Name
> ---
> 14530  16.6 MB   0.5 MB
> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/bin/passenger-spawn-server
> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
> 14531  100.8 MB  8.8 MB   Passenger spawn server
> 22565  191.2 MB  7.7 MB   Passenger ApplicationSpawner:
> /services/apache/example.com
> 22567  193.3 MB  7.8 MB   Rails: /services/apache/example.com
> ### Processes: 4
> ### Total private dirty RSS: 24.75 MB
>
> after 1 picture
>
> - Passenger processes -
> PIDVMSizePrivate  Name
> ---
> 14530  16.6 MB   0.5 MB
> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/bin/passenger-spawn-server
> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
> 14531  100.8 MB  8.8 MB   Passenger spawn server
> 22565  191.2 MB  17.9 MB  Passenger ApplicationSpawner:
> /services/apache/example.com
> 22567  286.0 MB  82.9 MB  Rails: /services/apache/example.com
> ### Processes: 4
> ### Total private dirty RSS: 110.11 MB
>
> picture 2
>
> - Passenger processes --
> PIDVMSizePrivate   Name
> 
> 14530  16.6 MB   0.5 MB
> /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
> 0 /opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/ 
> passenger-2.2.7/bin/passenger-spawn-server
> /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
> 14531  100.8 MB  8.8 MBPassenger spawn server
> 22565  191.2 MB  23.3 MB   Passenger ApplicationSpawner:
> /services/apache/example.com
> 22567  317.6 MB  120.0 MB  Rails: /services/apache/example.com
> ### Processes: 4
> ### Total private dirty RSS: 152.59 MB

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails 2.3.5 - missing gem problem

2009-12-01 Thread Colin Law
2009/12/1 ct9a :
> hi guys,
>
>  I just updated to rails 2.3.5 on os X snow leopard.
>
> When I try to run "rake routes", I get the following error indicating
> that the searchlogic gem is not installed.
>
> That cannot be right as it "rake routes" ran fine when I was still
> using rails 2.3.4 and that I even ran "gem install searchlogic" (with
> sudo) as per searchlogic's documentation.
>
> Any ideas?
>
> Also, does anyone know how to revert the rails version back to 2.3.4 ?
> That could be a quick fix until people fix the any potential issue
> with rails 2.3.5 .
>

Did you remember to run
rake rails:update
in your project directory?

To revert to 2.3.4 simply put
RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
at the head of environment.rb (you should see a similar line there
already, probably commented out).

Colin

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: Rails 2.3.5 - missing gem problem

2009-12-01 Thread MaD
reverting is easy. just uninstall your current rails-gem. if didn't
uninstall 2.3.4 it should still be there and your done. if you
uninstalled it, just install it with -v=2.3.4.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
Before
- Passenger processes -
PIDVMSizePrivate  Name
---
14530  16.6 MB   0.5 MB
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
0 
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/bin/passenger-spawn-server
 /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
14531  100.8 MB  8.8 MB   Passenger spawn server
22565  191.2 MB  7.7 MB   Passenger ApplicationSpawner:
/services/apache/example.com
22567  193.3 MB  7.8 MB   Rails: /services/apache/example.com
### Processes: 4
### Total private dirty RSS: 24.75 MB

after 1 picture

- Passenger processes -
PIDVMSizePrivate  Name
---
14530  16.6 MB   0.5 MB
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
0 
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/bin/passenger-spawn-server
 /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
14531  100.8 MB  8.8 MB   Passenger spawn server
22565  191.2 MB  17.9 MB  Passenger ApplicationSpawner:
/services/apache/example.com
22567  286.0 MB  82.9 MB  Rails: /services/apache/example.com
### Processes: 4
### Total private dirty RSS: 110.11 MB

picture 2

- Passenger processes --
PIDVMSizePrivate   Name

14530  16.6 MB   0.5 MB
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/ext/apache2/ApplicationPoolServerExecutable
0 
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/passenger-2.2.7/bin/passenger-spawn-server
 /opt/ruby-enterprise-1.8.7-20090928/bin/ruby  /tmp/passenger.14523
14531  100.8 MB  8.8 MBPassenger spawn server
22565  191.2 MB  23.3 MB   Passenger ApplicationSpawner:
/services/apache/example.com
22567  317.6 MB  120.0 MB  Rails: /services/apache/example.com
### Processes: 4
### Total private dirty RSS: 152.59 MB



Best regards,

Trausti

On Tue, Dec 1, 2009 at 11:31 AM, Peter De Berdt
 wrote:
>
> On 01 Dec 2009, at 10:39, Trausti Thor Johannsson wrote:
>
> Thats all, I just updated passenger to 2.2.7 but
>
> just by uploading one picture, private memory grows from 10.5 MB to
> 81.5 (with picture size 1.5 MB) and with next picture 118 MB
>
> I never ever use find(:all).  This is beyond ridiculous.  There has to
> be something I am doing wrong.
>
> What do your passenger-memory-stats show if I may ask (before and after
> uploading)?
>
> Best regards
>
> Peter De Berdt
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: rails 2.2.3 dirty.rb field_changed? method throwing arg error on creating an obj

2009-12-01 Thread Colin Law
2009/12/1 lunaclaire :
> OMG, you're right! Couldnt see the forest for the trees. Thx, Fred!
>
> This didnt show up in any lists I looked at for MagicReservedwords and
> such... I might have to find time to walk thru the rils code to see
> what other names could clash w method names.
>
> thx again
>
> On Nov 30, 3:55 pm, Frederick Cheung 
> wrote:
>> On Nov 30, 11:48 pm, lunaclaire  wrote:
>>
>> > sorry... we added to the original migration so that now the attr's are
>>
>> >       t.integer :update_request_id
>> >       t.integer :change_type
>> >       t.integer :assoc_obj_id
>> >       t.string :field_changed
>> >       t.string :new_value
>> >       t.integer :resolution
>>
>> field_changed is the one (the fact that the error message is talking
>> about field_changed is a hint in that direction
>>
>> Fred

I have added field_changed to the list at
http://wiki.rubyonrails.org/rails/pages/reservedwords

Colin

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Re: ActionView::TemplateError (can't convert ActiveRecord::Error into String)

2009-12-01 Thread icke
Abhis,

Well figured.  I had in fact installed the plugin from
http://rubyforge.org/projects/custom-error-message/ which I think I
picked up from one of the Railscasts.  This project is now invalid so
I am guessing that this has now been killed and that
http://github.com/gumayunov/custom-err-msg/tree must be the "current
version".

I am not sure how you are meant to keep track of things like that
(Using GIT?) .  My app started off under an earlier version of Rails
and the plugin worked ok. It still does  until last week!

Abhis awarded a Gold Star and a House Point.

O.

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Rails 2.3.5 - missing gem problem

2009-12-01 Thread ct9a
hi guys,

  I just updated to rails 2.3.5 on os X snow leopard.

When I try to run "rake routes", I get the following error indicating
that the searchlogic gem is not installed.



bash-3.2# gem install -v=2.3.5 rails

Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...
bash-3.2#
bash-3.2# rake routes
(in /Users/anexiole/projects/rails/RealAutoParts)
Missing these required gems:
  searchlogic

You're running:
  ruby 1.8.7.72 at /System/Library/Frameworks/Ruby.framework/Versions/
1.8/usr/bin/ruby
  rubygems 1.3.4 at /Users/anexiole/.gem/ruby/1.8, /Library/Ruby/Gems/
1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8

Run `rake gems:install` to install the missing gems.





That cannot be right as it "rake routes" ran fine when I was still
using rails 2.3.4 and that I even ran "gem install searchlogic" (with
sudo) as per searchlogic's documentation.

Any ideas?

Also, does anyone know how to revert the rails version back to 2.3.4 ?
That could be a quick fix until people fix the any potential issue
with rails 2.3.5 .

thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Rails 2.3.5 - missing gem problem

2009-12-01 Thread ct9a
hi guys,

  I just updated to rails 2.3.5 on os X snow leopard.

When I try to run "rake routes", I get the following error indicating
that the searchlogic gem is not installed.

That cannot be right as it "rake routes" ran fine when I was still
using rails 2.3.4 and that I even ran "gem install searchlogic" (with
sudo) as per searchlogic's documentation.

Any ideas?

Also, does anyone know how to revert the rails version back to 2.3.4 ?
That could be a quick fix until people fix the any potential issue
with rails 2.3.5 .

thanks

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Peter De Berdt

On 01 Dec 2009, at 10:39, Trausti Thor Johannsson wrote:

> Thats all, I just updated passenger to 2.2.7 but
>
> just by uploading one picture, private memory grows from 10.5 MB to
> 81.5 (with picture size 1.5 MB) and with next picture 118 MB
>
> I never ever use find(:all).  This is beyond ridiculous.  There has to
> be something I am doing wrong.

What do your passenger-memory-stats show if I may ask (before and  
after uploading)?


Best regards

Peter De Berdt

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] how do write codes to fetch my image URL

2009-12-01 Thread Oluwayomi Oluwadara
thanks.will try that

Regards and Respects,


Kindness in thought leads to wisdom.
Kindness in speech leads to eloquence.
Kindness in action leads to love.



--- On Mon, 11/30/09, tommy xiao  wrote:

From: tommy xiao 
Subject: Re: [Rails] how do write codes to fetch my image URL
To: rubyonrails-talk@googlegroups.com
Date: Monday, November 30, 2009, 6:49 PM

maybe rake db:seed can help you

2009/12/1 Oluwayomi Oluwadara 



Hi all,
I am stocked! i am developing an app(online store) and i need to put some 
images on.Can you help me with how to write the code? i want to write it in the 
 db/migrate 20091130.add_text_data.rd directory

Regards and Respects,


Kindness in thought leads to wisdom.

Kindness in speech leads to eloquence.
Kindness in action leads to love.







  



--

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-t...@googlegroups.com.


To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.





-- 
tommy xiao
E-mail: xiaods(AT)gmail.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-t...@googlegroups.com.


To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.





  

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails 2.3.5 - Cannot install plugin

2009-12-01 Thread Hoang Nghiem
Hi Conrad,

Here is the command I used:

ruby script/plugin install git://github.com/aaronchi/jrails.git

I'm using windows XP to develop.

Thanks!

2009/12/1 Conrad Taylor 

> On Mon, Nov 30, 2009 at 8:09 PM, hnghiem wrote:
>
>> I'm always get the message "Plugin not found: ["git://github.com/
>> aaronchi/jrails.git "]" when
>> trying to install a rails plugin, even for
>> SVN or GIT. After google search, some people suggest that replace
>> "git://" with "http://"; and add "/" at the end of the url. I tried and
>> it still does not work.
>>
>> I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and
>> it show the message "#> null>". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google
>> search a lot and still not know how to fix. Please help!
>>
>> Thanks!
>>
>
> Hi, what's the exact command you're using to install the plugin?
>
> -Conrad
>
>
>>
>> --
>>
>> 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-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>>
>  --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
Hi Peter, here is my gemlist

actionmailer (2.3.5, 2.3.4, 2.3.3)
actionpack (2.3.5, 2.3.4, 2.3.3)
activerecord (2.3.5, 2.3.4, 2.3.3)
activeresource (2.3.5, 2.3.4, 2.3.3)
activesupport (2.3.5, 2.3.4, 2.3.3)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
mongrel (1.1.5)
mysql (2.8.1)
passenger (2.2.7)
rack (1.0.1, 1.0.0)
rails (2.3.5, 2.3.3)
rake (0.8.7)
rmagick (2.12.1)
rubyzip (0.9.1)

and these are my plugins

attachment_fu (1-2 months old)
easy-fckeditor  0.8.1  (not used anywhere)
modporter-plugin (installed today)
will_paginate 2.3.6


Thats all, I just updated passenger to 2.2.7 but

just by uploading one picture, private memory grows from 10.5 MB to
81.5 (with picture size 1.5 MB) and with next picture 118 MB

I never ever use find(:all).  This is beyond ridiculous.  There has to
be something I am doing wrong.


Best regards,


Trausti




On Tue, Dec 1, 2009 at 10:18 AM, Peter De Berdt
 wrote:
>
> On 01 Dec 2009, at 09:51, Trausti Thor Johannsson wrote:
>
> Now I just installed mod_porter and all.  But when I use
> passenger-memory-stats
>
> I can see that my app uses 194 MB memory, I upload 1 picture and bang
> it uses 285 MB and 2nd picture it uses 316 MB.
>
> This is just ridiculous for an app that only does one thing, upload
> pictures and display thumbnails.
>
> Any ideas ?
>
> By the looks of it (every spawned Rails process takes about 40-ish MB),
> you're wildly spawning extra Rails processes for some reason. We are using
> attachment_fu (and paperclip for that matter) intensively in a number of our
> applications and have no problems with high memory usage (except the initial
> RMagick hit). There must be something either in your server processes
> (RMagick, ImageMagick, other gem, …) that's miscompiled or outdated or you
> have something around the image uploading that kills your server (threads
> spawning). The simple fact of the matter is that something is keeping the
> Passenger rails process busy and it spawns new ones to cope with new
> incoming requests.
>
> Best regards
>
> Peter De Berdt
>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Rails 2.3.5 - Cannot install plugin

2009-12-01 Thread Conrad Taylor
On Mon, Nov 30, 2009 at 8:09 PM, hnghiem  wrote:

> I'm always get the message "Plugin not found: ["git://github.com/
> aaronchi/jrails.git"]" when trying to install a rails plugin, even for
> SVN or GIT. After google search, some people suggest that replace
> "git://" with "http://"; and add "/" at the end of the url. I tried and
> it still does not work.
>
> I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and
> it show the message "# null>". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google
> search a lot and still not know how to fix. Please help!
>
> Thanks!
>

Hi, what's the exact command you're using to install the plugin?

-Conrad


>
> --
>
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Rails 2.3.5 - Cannot install plugin

2009-12-01 Thread hnghiem
I'm always get the message "Plugin not found: ["git://github.com/
aaronchi/jrails.git"]" when trying to install a rails plugin, even for
SVN or GIT. After google search, some people suggest that replace
"git://" with "http://"; and add "/" at the end of the url. I tried and
it still does not work.

I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and
it show the message "#". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google
search a lot and still not know how to fix. Please help!

Thanks!

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Peter De Berdt

On 01 Dec 2009, at 09:51, Trausti Thor Johannsson wrote:

> Now I just installed mod_porter and all.  But when I use passenger- 
> memory-stats
>
> I can see that my app uses 194 MB memory, I upload 1 picture and bang
> it uses 285 MB and 2nd picture it uses 316 MB.
>
> This is just ridiculous for an app that only does one thing, upload
> pictures and display thumbnails.
>
> Any ideas ?

By the looks of it (every spawned Rails process takes about 40-ish  
MB), you're wildly spawning extra Rails processes for some reason. We  
are using attachment_fu (and paperclip for that matter) intensively in  
a number of our applications and have no problems with high memory  
usage (except the initial RMagick hit). There must be something either  
in your server processes (RMagick, ImageMagick, other gem, …) that's  
miscompiled or outdated or you have something around the image  
uploading that kills your server (threads spawning). The simple fact  
of the matter is that something is keeping the Passenger rails process  
busy and it spawns new ones to cope with new incoming requests.


Best regards

Peter De Berdt

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
Now I just installed mod_porter and all.  But when I use passenger-memory-stats

I can see that my app uses 194 MB memory, I upload 1 picture and bang
it uses 285 MB and 2nd picture it uses 316 MB.

This is just ridiculous for an app that only does one thing, upload
pictures and display thumbnails.

Any ideas ?



Trausti

--

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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.