<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5338622142565544877</id><updated>2011-11-27T15:26:41.948-08:00</updated><category term='VADEMÉCUM'/><category term='MIR TIPS'/><category term='Biophysica'/><category term='Medicine History'/><category term='Medicine Intensive'/><category term='Neonatology'/><category term='Medical Dictionary'/><category term='Protocols'/><category term='Endocrinology'/><category term='Geriatric'/><category term='Psychiatry'/><category term='Sport Medicine'/><category term='Pediatric'/><category term='Respiratory'/><category term='Genetic'/><category term='Surgical'/><category term='Psychology'/><category term='Anatomy'/><category term='Urology'/><category term='Rheumatology'/><category term='Physical Medicine and Rehabilitation'/><category term='Obstetrics and Gynecology'/><category term='Physiology'/><category term='Legal Medicine'/><category term='Hand Surgical'/><category term='Radiology'/><category term='Bioethic'/><category term='Oncology'/><category term='Traumatology'/><category term='EKG'/><category term='Microbiology'/><category term='Epidemiology'/><category term='Pharmacology'/><category term='Dermatology'/><category term='Neurology'/><category term='Medical Procedures'/><category term='Occupational and Environmental Medicine'/><category term='Hematology'/><category term='Ophthalmology'/><category term='USMLE TIPS'/><category term='Burns'/><category term='Nurser'/><category term='Cardiology'/><category term='Nutrition'/><category term='Neurosurgery'/><category term='SUBSCRIBE IN TOO'/><category term='Hepatology'/><category term='Odontology'/><category term='Diabetics'/><category term='Medical Guide'/><category term='Anemy'/><category term='Veterinary Emergency'/><category term='Medical News'/><category term='Gastroenterology'/><category term='Emergency'/><category term='Embriology'/><category term='Secrets Series'/><category term='Anesthesia'/><category term='Biochemistry'/><category term='Infectology'/><category term='Histology'/><category term='Natural Medicine'/><category term='Forense Anthropology'/><category term='Pediatric Surgery'/><title type='text'>Greenpoint</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default?start-index=101&amp;max-results=100'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12266</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1420451014169949947</id><published>2009-07-05T10:44:00.001-07:00</published><updated>2009-07-05T10:44:36.139-07:00</updated><title type='text'>[Rails] Re: conditions either null or real value</title><content type='html'>Grayson Piercee wrote:&lt;br&gt;[...]&lt;br&gt;&amp;gt; I&amp;#39;m using acts_as_tree which meets the root levels have no parent_id&lt;br&gt;&amp;gt; (null in SQL)&lt;br&gt;&amp;gt; so if no category_id is passed as a parameter I want it to pull up the&lt;br&gt;&amp;gt; roots, if one is passed, I want it to pull the children of that node.&lt;p&gt;You should probably be using something like awesome_nested_set instead &lt;br&gt;-- it allows for much more efficient DB operations.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1420451014169949947?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1420451014169949947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1420451014169949947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1420451014169949947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1420451014169949947'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-conditions-either-null-or-real.html' title='[Rails] Re: conditions either null or real value'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6358167090224464623</id><published>2009-07-05T10:42:00.000-07:00</published><updated>2009-07-05T10:43:04.850-07:00</updated><title type='text'>[Rails] Re: How to Synchronize?</title><content type='html'>&amp;gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;gt; Would it be OK to create a model and its corresponding table for just &lt;br&gt;&amp;gt;&amp;gt; locking? i.e. Lock model and locks table.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; That would be pointless.  If you wrap your DB operations in a &lt;br&gt;&amp;gt; transaction, you will automatically get the appropriate locks -- and the &lt;br&gt;&amp;gt; DB will keep track of them, so you don&amp;#39;t have to.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Best,&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Marnen Laibow-Koser&lt;br&gt;&amp;gt; &lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;p&gt;Yes, I got your point.&lt;p&gt;But I think that the situation is not that clear. I don&amp;#39;t know a single &lt;br&gt;model to have a transaction open and be safe after.&lt;p&gt;So you might be right if I had a design which kept that in mind right &lt;br&gt;from the beginning. But -at least as a workaround- I need something like &lt;br&gt;that.&lt;p&gt;A moment ago, I found this:&lt;p&gt;&lt;a href="http://kseebaldt.blogspot.com/2007/11/synchronizing-using-active-record.html"&gt;http://kseebaldt.blogspot.com/2007/11/synchronizing-using-active-record.html&lt;/a&gt;&lt;p&gt;This is pretty much the functionality I require.&lt;p&gt;I think I will use this.&lt;p&gt;Didn&amp;#39;t anybody require anything like this?&lt;p&gt;Thanks&lt;br&gt;Onur&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6358167090224464623?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6358167090224464623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6358167090224464623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6358167090224464623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6358167090224464623'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-synchronize_4243.html' title='[Rails] Re: How to Synchronize?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5037057535787516499</id><published>2009-07-05T10:38:00.001-07:00</published><updated>2009-07-05T10:38:50.354-07:00</updated><title type='text'>[Rails] Re: sanitize() AND escapeHTML()/h() ?</title><content type='html'>Tom Ha wrote:&lt;br&gt;&amp;gt; Hi there,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; is it correct that one should always use both...&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;   1.&lt;br&gt;&amp;gt; sanitize(params[:whatever_external_or_user_input_to_save_to_database]),&lt;br&gt;&amp;gt; AND&lt;br&gt;&amp;gt;   2. h(@whatever_database_record_to_display_on_page)&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; ...in order to have the highest security level? &lt;p&gt;AFAIK, sanitize should not be necessary -- ActiveRecord uses &lt;br&gt;parameterized queries, which already protect against SQL injection &lt;br&gt;without further sanitization.  (If you write your own SQL, your queries &lt;br&gt;should also be parameterized.). h, on the other hand, is not about &lt;br&gt;security so much as it is about keeping markup valid and correct.  You &lt;br&gt;should definitely use it on anything that comes from the DB, unless &lt;br&gt;you&amp;#39;re deliberately storing HTML code in there.&lt;p&gt;BTW, if you use Haml (highly recommended), it has a very useful &lt;br&gt;shorthand construct for this (&amp;amp;= instead of h), and you can even turn on &lt;br&gt;HTML escaping as a global default.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5037057535787516499?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5037057535787516499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5037057535787516499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5037057535787516499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5037057535787516499'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-sanitize-and-escapehtmlh.html' title='[Rails] Re: sanitize() AND escapeHTML()/h() ?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8586858964309370718</id><published>2009-07-05T10:32:00.001-07:00</published><updated>2009-07-05T10:32:29.809-07:00</updated><title type='text'>[Rails] Re: How do I generate dynamic items dynamically?</title><content type='html'>Michael Williams wrote:&lt;br&gt;&amp;gt; Hi All,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I&amp;#39;m looking for a way to append elements with javascript using&lt;br&gt;&amp;gt; javascript.  Basically I have two lists of items.  One has a list of&lt;br&gt;&amp;gt; items with an &amp;quot;ADD&amp;quot; button (using &amp;quot;link_to_remote&amp;quot;) and the other has&lt;br&gt;&amp;gt; a list of items with a &amp;quot;REMOVE&amp;quot; button (using &amp;quot;link_to_remote&amp;quot;).  &lt;p&gt;Do you really need to do it that way?  That will call the server every &lt;br&gt;time a button is clicked.  You might want to do the list editing on the &lt;br&gt;client side, then have a Save button that sends the list to the server.&lt;p&gt;&lt;br&gt;&amp;gt; When&lt;br&gt;&amp;gt; I click the &amp;quot;ADD&amp;quot; it immediately places the item into the other list.&lt;br&gt;&amp;gt; However, I need to be able to have the newly inserted item perform the&lt;br&gt;&amp;gt; reverse action for &amp;quot;REMOVE&amp;quot;.&lt;p&gt;So the Add button works, but the Remove button does not?  You should be &lt;br&gt;able to do both the same way -- after all, the only difference is that &lt;br&gt;Add moves things from list 1 to list 2, while Remove does likewise from &lt;br&gt;list 2 to list 1.&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; I see no way (besides, perhaps creating a partial to render a non-&lt;br&gt;&amp;gt; object) to dynamically generate dynamic items of this nature.&lt;p&gt;I am not sure what your problem is.  Please provide more detail and &lt;br&gt;code.&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; Any ideas?&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Best.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8586858964309370718?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8586858964309370718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8586858964309370718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8586858964309370718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8586858964309370718'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-do-i-generate-dynamic.html' title='[Rails] Re: How do I generate dynamic items dynamically?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6856457794679680927</id><published>2009-07-05T10:26:00.001-07:00</published><updated>2009-07-05T10:26:52.020-07:00</updated><title type='text'>[Rails] sanitize() AND escapeHTML()/h() ?</title><content type='html'>Hi there,&lt;p&gt;is it correct that one should always use both...&lt;p&gt;  1.&lt;br&gt;sanitize(params[:whatever_external_or_user_input_to_save_to_database]),&lt;br&gt;AND&lt;br&gt;  2. h(@whatever_database_record_to_display_on_page)&lt;p&gt;...in order to have the highest security level? (Besides all the other&lt;br&gt;security stuff to do, of course)&lt;p&gt;Thanks a lot!&lt;br&gt;Tom&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6856457794679680927?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6856457794679680927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6856457794679680927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6856457794679680927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6856457794679680927'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-sanitize-and-escapehtmlh.html' title='[Rails] sanitize() AND escapeHTML()/h() ?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3936557817041211838</id><published>2009-07-05T10:24:00.001-07:00</published><updated>2009-07-05T10:24:32.205-07:00</updated><title type='text'>[Rails] Re: repeated conditions in sql queries</title><content type='html'>Barun Singh wrote:&lt;br&gt;[...]&lt;br&gt;&amp;gt; consider the following app with two models linked through a join&lt;br&gt;&amp;gt; table:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; class User &amp;lt; ActiveRecord::Base&lt;br&gt;&amp;gt;   has_many :boxes_users&lt;br&gt;&amp;gt;   has_many :boxes, :through =&amp;gt; :boxes_users&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; class Box &amp;lt; ActiveRecord::Base&lt;br&gt;&amp;gt;   named_scope :brown, :conditions =&amp;gt; {:color =&amp;gt; &amp;#39;brown&amp;#39;}&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; class BoxesUser &amp;lt; ActiveRecord::Base&lt;br&gt;&amp;gt;   belongs_to :box&lt;br&gt;&amp;gt;   belongs_to :user&lt;br&gt;&amp;gt; end&lt;p&gt;Off the main topic for a second: if the join table needs a separate &lt;br&gt;model, change its name to something more descriptive.  &amp;quot;BoxesUser&amp;quot; is &lt;br&gt;not a terribly descriptive name.  &amp;quot;Assignment&amp;quot; or &amp;quot;BoxAssignment&amp;quot; might &lt;br&gt;be clearer.&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; If I run this query:&lt;br&gt;&amp;gt;  &amp;gt;&amp;gt; User.find(1).boxes.brown&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; The following SQL is generated:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; SELECT &amp;quot;boxes&amp;quot;.* FROM &amp;quot;boxes&amp;quot; INNER JOIN &amp;quot;boxes_users&amp;quot; ON &amp;quot;boxes&amp;quot;.id =&lt;br&gt;&amp;gt; &amp;quot;boxes_users&amp;quot;.box_id WHERE ((&amp;quot;boxes_users&amp;quot;.user_id = 1)) AND&lt;br&gt;&amp;gt; ((&amp;quot;boxes&amp;quot;.&amp;quot;color&amp;quot; = &amp;#39;brown&amp;#39;) AND ((&amp;quot;boxes_users&amp;quot;.user_id = 1)))&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Note that the (&amp;quot;boxes_users&amp;quot;.user_id = 1) condition is repeated in the&lt;br&gt;&amp;gt; sql query.  Think does not impact the query results (though it does&lt;br&gt;&amp;gt; makes parsing the development log a bit more tedious).  Just curious&lt;br&gt;&amp;gt; if anyone knows if this could potentially lead to less efficient&lt;br&gt;&amp;gt; database queries in some circumstances, or have other secondary&lt;br&gt;&amp;gt; effects?&lt;p&gt;I doubt it.  I would guess that the DB&amp;#39;s query optimizer would notice &lt;br&gt;the duplicate condition right away and remove it.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3936557817041211838?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3936557817041211838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3936557817041211838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3936557817041211838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3936557817041211838'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-repeated-conditions-in-sql.html' title='[Rails] Re: repeated conditions in sql queries'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8963313985160272483</id><published>2009-07-05T10:08:00.000-07:00</published><updated>2009-07-05T10:09:10.815-07:00</updated><title type='text'>[Rails] Re: Not sure how to do this</title><content type='html'>On 3 jul, 22:43, Pat Nakajima &amp;lt;&lt;a href="mailto:patnakaj...@gmail.com"&gt;patnakaj...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; &amp;gt; Could you explain why the first part would go entirely into the&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Machine model?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Because it&amp;#39;s better to encapsulate&lt;br&gt;&amp;gt; model logic in the models (and custom finders are model logic).&lt;br&gt;&amp;gt; Controllers should only be responsible for receiving a request,&lt;br&gt;&amp;gt; calling the appropriate model methods,&lt;br&gt;&amp;gt; then returning a response.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; - Pat&lt;p&gt;Thank you, that&amp;#39;s very clear!&lt;p&gt;I&amp;#39;ve decided to try and go with this solution as this actually does&lt;br&gt;what I inteded to do. I just had some trouble understanding why in&lt;br&gt;most examples this piece of code is put into the controller and you&lt;br&gt;don&amp;#39;t.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8963313985160272483?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8963313985160272483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8963313985160272483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8963313985160272483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8963313985160272483'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-not-sure-how-to-do-this_3285.html' title='[Rails] Re: Not sure how to do this'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4606196367734809620</id><published>2009-07-05T10:00:00.001-07:00</published><updated>2009-07-05T10:00:36.765-07:00</updated><title type='text'>[Rails] Re: Params Merge and URL sorting/pagination</title><content type='html'>&amp;gt; If a form&amp;#39;s submission method is get, then when you submit the form&lt;br&gt;&amp;gt; its input elements are serialized and turned into a query string. The&lt;br&gt;&amp;gt; standard just say that a ? and this query string is appended to the&lt;br&gt;&amp;gt; action attribute (which would probably create an invalid url such as&lt;br&gt;&amp;gt; foo?bar=baz?search=Florida ). In practise most browsers seem to just&lt;br&gt;&amp;gt; ignore the query string that was part of the action attribute,&lt;br&gt;&amp;gt; although I can&amp;#39;t see anything in the standards that says this is ok&lt;br&gt;&amp;gt; (equally I can&amp;#39;t see anything that says that the query strings need to&lt;br&gt;&amp;gt; be concatenated in a smart way). Given that the browser is going to&lt;br&gt;&amp;gt; junk the query string bit from the form&amp;#39;s action attribute you&amp;#39;ll need&lt;br&gt;&amp;gt; all of your various parameters as form parameters (unless you have&lt;br&gt;&amp;gt; routes which push those parameters into the path of the url)..&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Fred&lt;p&gt;Thanks Fred,&lt;p&gt;So, realistically if I just want a one-form submit query, I have to &lt;br&gt;either add hidden field inputs that pull the given parameters on the &lt;br&gt;given page so the form builds the query, or I have to use routes to do &lt;br&gt;something similar...&lt;p&gt;I&amp;#39;m almost inclined to believe that it will be simpler to just create an &lt;br&gt;advanced search form with all queries in place..&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4606196367734809620?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4606196367734809620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4606196367734809620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4606196367734809620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4606196367734809620'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-params-merge-and-url_7710.html' title='[Rails] Re: Params Merge and URL sorting/pagination'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1543146862987424379</id><published>2009-07-05T09:48:00.000-07:00</published><updated>2009-07-05T09:49:07.066-07:00</updated><title type='text'>[Rails] Re: Authlogic &amp; password problems using rspec</title><content type='html'>doh, i ran into same problem. the fixture was generated with the now&lt;br&gt;invalid password column. simply delete it&lt;p&gt;$ rm test/fixtures/users.yml&lt;p&gt;&lt;br&gt;On Jun 29, 4:06&amp;#160;pm, Yoann-Z &amp;lt;&lt;a href="mailto:yoann.zim...@gmail.com"&gt;yoann.zim...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have a problem using rspec with my rspec tests with my application.&lt;br&gt;&amp;gt; I used authlogic to create my athentication system, following the&lt;br&gt;&amp;gt; video on railscast. It works fine with cucumber, but I always have a&lt;br&gt;&amp;gt; problem with rspec :&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; ActiveRecord::StatementInvalid in &amp;#39;ApplUsersController new action&lt;br&gt;&amp;gt; should render new template&amp;#39;&lt;br&gt;&amp;gt; SQLite3::SQLException: table appl_users has no column named password:&lt;br&gt;&amp;gt; INSERT INTO &amp;quot;appl_users&amp;quot; (&amp;quot;created_at&amp;quot;, &amp;quot;updated_at&amp;quot;, &amp;quot;username&amp;quot;,&lt;br&gt;&amp;gt; &amp;quot;id&amp;quot;, &amp;quot;password&amp;quot;, &amp;quot;email&amp;quot;) VALUES (&amp;#39;2009-06-29 23:01:48&amp;#39;, &amp;#39;2009-06-29&lt;br&gt;&amp;gt; 23:01:48&amp;#39;, &amp;#39;MyString&amp;#39;, 996332877, &amp;#39;MyString&amp;#39;, &amp;#39;MyString&amp;#39;)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; In my spec file it is related to these lines :&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; it &amp;quot;new action should render new template&amp;quot; do&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; get :new&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; response.should render_template(:new)&lt;br&gt;&amp;gt; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I think it is because of my migration file but I&amp;#39;m really not sure&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; def self.up&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; create_table :appl_users do |t|&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.string :username&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.string :email&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.string :crypted_password&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.string :password_salt&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.string :persistence_token&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; t.timestamps&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; could you help me please?&lt;br&gt;&amp;gt; Thanks by advance&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; -Yoann-Z&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1543146862987424379?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1543146862987424379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1543146862987424379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1543146862987424379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1543146862987424379'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-authlogic-password-problems.html' title='[Rails] Re: Authlogic &amp; password problems using rspec'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4719432502957402212</id><published>2009-07-05T09:22:00.000-07:00</published><updated>2009-07-05T09:23:24.491-07:00</updated><title type='text'>[Rails] Re: How to Synchronize?</title><content type='html'>Onur Gungor wrote:&lt;br&gt;[...]&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; But then how can I synchronize this method&amp;#39;s usage? I am very new to web &lt;br&gt;&amp;gt; development so I just heard about database locking.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Simply, how should I use the &lt;br&gt;&amp;gt; ActiveRecord::Transactions::ClassMethods#transaction and &lt;br&gt;&amp;gt; ActiveRecord::Base#lock!?&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Would it be OK to create a model and its corresponding table for just &lt;br&gt;&amp;gt; locking? i.e. Lock model and locks table.&lt;p&gt;That would be pointless.  If you wrap your DB operations in a &lt;br&gt;transaction, you will automatically get the appropriate locks -- and the &lt;br&gt;DB will keep track of them, so you don&amp;#39;t have to.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4719432502957402212?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4719432502957402212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4719432502957402212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4719432502957402212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4719432502957402212'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-synchronize_7479.html' title='[Rails] Re: How to Synchronize?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8361106809457589503</id><published>2009-07-05T09:20:00.001-07:00</published><updated>2009-07-05T09:20:48.170-07:00</updated><title type='text'>[Rails] Re: How to Synchronize?</title><content type='html'>On Jul 5, 12:04&amp;#160;pm, Onur Gungor &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; OK. Then it means Mutex&amp;#39;es don&amp;#39;t work in a multi-process Passenger&lt;br&gt;&amp;gt; setup.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; But then how can I synchronize this method&amp;#39;s usage? I am very new to web&lt;br&gt;&amp;gt; development so I just heard about database locking.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Simply, how should I use the&lt;br&gt;&amp;gt; ActiveRecord::Transactions::ClassMethods#transaction and&lt;br&gt;&amp;gt; ActiveRecord::Base#lock!?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Would it be OK to create a model and its corresponding table for just&lt;br&gt;&amp;gt; locking? i.e. Lock model and locks table.&lt;p&gt;That or rails&amp;#39; optimistic locking might be useful. I would usually shy&lt;br&gt;away from creating a Lock model, it just seems a bit artificial. I&lt;br&gt;would probably stick a locked_by_foo column on the appropriate model&lt;br&gt;and use that to tell whether a particular object is being updated (and&lt;br&gt;use optimistic locking in conjunction with that)&lt;p&gt;Fred&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Then use them like this:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Lock.transaction do&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; lock = Lock.find(1)&lt;br&gt;&amp;gt; &amp;#160; lock.lock!&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; # do my stuff which should be done by only one process at a time.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks,&lt;br&gt;&amp;gt; Onur&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8361106809457589503?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8361106809457589503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8361106809457589503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8361106809457589503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8361106809457589503'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-synchronize_2884.html' title='[Rails] Re: How to Synchronize?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3354655768774582503</id><published>2009-07-05T09:08:00.000-07:00</published><updated>2009-07-05T09:09:07.213-07:00</updated><title type='text'>[Rails] Re: Deploying without capistrano, using git pull?</title><content type='html'>davetron5000 wrote:&lt;br&gt;&amp;gt; I&amp;#39;m NOT working on an enterprisey big time rails application; just&lt;br&gt;&amp;gt; something for my personal site.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I&amp;#39;ve been deploying via&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; local&amp;gt; git push origin master&lt;br&gt;&amp;gt; remote&amp;gt; git pull origin&lt;br&gt;&amp;gt; remote&amp;gt; sudo /etc/init.d/httpd restart&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Trying to decide if this is sufficient, or if learning capistrano and&lt;br&gt;&amp;gt; setting that up will give me any advantages over this?&lt;p&gt;It&amp;#39;s usually better to automate where possible, and Capistrano gives you &lt;br&gt;a quick way of deploying with one command -- and rolling back with one &lt;br&gt;command.  Honestly, I don&amp;#39;t see why you *wouldn&amp;#39;t* use it.&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Thanks,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Dave&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3354655768774582503?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3354655768774582503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3354655768774582503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3354655768774582503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3354655768774582503'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-deploying-without-capistrano_05.html' title='[Rails] Re: Deploying without capistrano, using git pull?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2110143389477911786</id><published>2009-07-05T09:06:00.001-07:00</published><updated>2009-07-05T09:06:51.636-07:00</updated><title type='text'>[Rails] Re: How can I DRY this up?</title><content type='html'>Ha!&lt;p&gt;Rookie error&lt;p&gt;&lt;br&gt;Thanks for that Fred.&lt;p&gt;:)&lt;p&gt;On Jul 5, 4:52&amp;#160;pm, Frederick Cheung &amp;lt;&lt;a href="mailto:frederick.che...@gmail.com"&gt;frederick.che...@gmail.com&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; On Jul 5, 11:42&amp;#160;am, Gavin &amp;lt;&lt;a href="mailto:ga...@thinkersplayground.com"&gt;ga...@thinkersplayground.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; module CommonValidations&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; def included(base)&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; &amp;#160; base.class_eval do&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; &amp;#160; &amp;#160; validates_presence_of :name&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; end&lt;br&gt;&amp;gt; &amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; and then include this module in the models that require it. I&amp;#39;ve also&lt;br&gt;&amp;gt; &amp;gt; tried various combinations with &amp;#39;eval&amp;#39; and &amp;#39;send&amp;#39; etc.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Did you check to see whether your included method is called at all ?&lt;br&gt;&amp;gt; The included method needs to be a module method, i.e.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; def self.included(base)&lt;br&gt;&amp;gt; ...&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; for it to be used the way you want it to be used.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Fred&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; The validations aren&amp;#39;t called :(&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Can anyone explain why this isn&amp;#39;t working and if it&amp;#39;s possbile to re-&lt;br&gt;&amp;gt; &amp;gt; use validations like this?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Thanks&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Gavin&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2110143389477911786?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2110143389477911786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2110143389477911786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2110143389477911786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2110143389477911786'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-can-i-dry-this-up_05.html' title='[Rails] Re: How can I DRY this up?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2210305319971227337</id><published>2009-07-05T09:04:00.000-07:00</published><updated>2009-07-05T09:05:05.874-07:00</updated><title type='text'>[Rails] Re: How to Synchronize?</title><content type='html'>Frederick Cheung wrote:&lt;br&gt;&amp;gt; On Jul 2, 11:10�am, Onur Gungor &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; First I suspected that this problem is originating because Passenger was&lt;br&gt;&amp;gt;&amp;gt; spawning processes and they are not sharing the mutex. But I checked the&lt;br&gt;&amp;gt;&amp;gt; documentation but couldn&amp;#39;t find a mention of it. And in this link&lt;br&gt;&amp;gt;&amp;gt; (&lt;a href="http://m.onkey.org/2008/10/23/thread-safety-for-your-rails"&gt;http://m.onkey.org/2008/10/23/thread-safety-for-your-rails&lt;/a&gt;) it says&lt;br&gt;&amp;gt;&amp;gt; that it&amp;#39;s OK to use Mutexes (though not mentioning the multiprocess&lt;br&gt;&amp;gt;&amp;gt; passenger).&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Mutexes aren&amp;#39;t for cross process synchronisation (unlike a mutex in&lt;br&gt;&amp;gt; windows which can be shared across processes).&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Fred&lt;p&gt;OK. Then it means Mutex&amp;#39;es don&amp;#39;t work in a multi-process Passenger &lt;br&gt;setup.&lt;p&gt;But then how can I synchronize this method&amp;#39;s usage? I am very new to web &lt;br&gt;development so I just heard about database locking.&lt;p&gt;Simply, how should I use the &lt;br&gt;ActiveRecord::Transactions::ClassMethods#transaction and &lt;br&gt;ActiveRecord::Base#lock!?&lt;p&gt;Would it be OK to create a model and its corresponding table for just &lt;br&gt;locking? i.e. Lock model and locks table.&lt;p&gt;Then use them like this:&lt;p&gt;Lock.transaction do&lt;p&gt;  lock = Lock.find(1)&lt;br&gt;  lock.lock!&lt;p&gt;  # do my stuff which should be done by only one process at a time.&lt;p&gt;end&lt;p&gt;Thanks,&lt;br&gt;Onur&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2210305319971227337?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2210305319971227337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2210305319971227337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2210305319971227337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2210305319971227337'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-synchronize_05.html' title='[Rails] Re: How to Synchronize?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6678114969126610355</id><published>2009-07-05T08:52:00.000-07:00</published><updated>2009-07-05T08:53:25.195-07:00</updated><title type='text'>[Rails] Re: How can I DRY this up?</title><content type='html'>On Jul 5, 11:42&amp;#160;am, Gavin &amp;lt;&lt;a href="mailto:ga...@thinkersplayground.com"&gt;ga...@thinkersplayground.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; module CommonValidations&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; def included(base)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; base.class_eval do&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; validates_presence_of :name&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt; &amp;#160; end&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; and then include this module in the models that require it. I&amp;#39;ve also&lt;br&gt;&amp;gt; tried various combinations with &amp;#39;eval&amp;#39; and &amp;#39;send&amp;#39; etc.&lt;p&gt;Did you check to see whether your included method is called at all ?&lt;br&gt;The included method needs to be a module method, i.e.&lt;p&gt;def self.included(base)&lt;br&gt;...&lt;br&gt;end&lt;p&gt;for it to be used the way you want it to be used.&lt;p&gt;Fred&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; The validations aren&amp;#39;t called :(&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Can anyone explain why this isn&amp;#39;t working and if it&amp;#39;s possbile to re-&lt;br&gt;&amp;gt; use validations like this?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Gavin&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6678114969126610355?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6678114969126610355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6678114969126610355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6678114969126610355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6678114969126610355'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-can-i-dry-this-up.html' title='[Rails] Re: How can I DRY this up?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6477754543434384682</id><published>2009-07-05T08:46:00.000-07:00</published><updated>2009-07-05T09:18:22.156-07:00</updated><title type='text'>[Rails] repeated conditions in sql queries</title><content type='html'>This is a minor question, mostly for curiosity:  using rails 2.3, does&lt;br&gt;anybody else notice repeated conditions in sql queries?&lt;p&gt;consider the following app with two models linked through a join&lt;br&gt;table:&lt;p&gt;&lt;br&gt;class User &amp;lt; ActiveRecord::Base&lt;br&gt;  has_many :boxes_users&lt;br&gt;  has_many :boxes, :through =&amp;gt; :boxes_users&lt;br&gt;end&lt;p&gt;class Box &amp;lt; ActiveRecord::Base&lt;br&gt;  named_scope :brown, :conditions =&amp;gt; {:color =&amp;gt; &amp;#39;brown&amp;#39;}&lt;br&gt;end&lt;p&gt;class BoxesUser &amp;lt; ActiveRecord::Base&lt;br&gt;  belongs_to :box&lt;br&gt;  belongs_to :user&lt;br&gt;end&lt;p&gt;&lt;br&gt;If I run this query:&lt;br&gt; &amp;gt;&amp;gt; User.find(1).boxes.brown&lt;p&gt;The following SQL is generated:&lt;p&gt;SELECT &amp;quot;boxes&amp;quot;.* FROM &amp;quot;boxes&amp;quot; INNER JOIN &amp;quot;boxes_users&amp;quot; ON &amp;quot;boxes&amp;quot;.id =&lt;br&gt;&amp;quot;boxes_users&amp;quot;.box_id WHERE ((&amp;quot;boxes_users&amp;quot;.user_id = 1)) AND&lt;br&gt;((&amp;quot;boxes&amp;quot;.&amp;quot;color&amp;quot; = &amp;#39;brown&amp;#39;) AND ((&amp;quot;boxes_users&amp;quot;.user_id = 1)))&lt;p&gt;&lt;br&gt;Note that the (&amp;quot;boxes_users&amp;quot;.user_id = 1) condition is repeated in the&lt;br&gt;sql query.  Think does not impact the query results (though it does&lt;br&gt;makes parsing the development log a bit more tedious).  Just curious&lt;br&gt;if anyone knows if this could potentially lead to less efficient&lt;br&gt;database queries in some circumstances, or have other secondary&lt;br&gt;effects?&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6477754543434384682?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6477754543434384682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6477754543434384682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6477754543434384682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6477754543434384682'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-repeated-conditions-in-sql.html' title='[Rails] repeated conditions in sql queries'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-422728722137769525</id><published>2009-07-05T08:42:00.000-07:00</published><updated>2009-07-05T08:43:16.330-07:00</updated><title type='text'>[Rails] How can I DRY this up?</title><content type='html'>Hey all!&lt;p&gt;Hope you&amp;#39;re having a good weekend.&lt;p&gt;I have a couple of models that share a lot of similar validation so I&lt;br&gt;figured this would be a good opportunity to DRY my code up.&lt;p&gt;lets say for example:&lt;p&gt;class Squirrel &amp;lt; ActiveRecode::Base&lt;p&gt;  validates_presence_of :name&lt;p&gt;end&lt;p&gt;class Badger &amp;lt; ActiveRecode::Base&lt;p&gt;  validates_presence_of :name&lt;p&gt;end&lt;p&gt;what I&amp;#39;ve been trying to do is add a module in /lib called&lt;br&gt;CommonValidations&lt;p&gt;module CommonValidations&lt;p&gt;  def included(base)&lt;br&gt;    base.class_eval do&lt;br&gt;      validates_presence_of :name&lt;br&gt;    end&lt;br&gt;  end&lt;br&gt;end&lt;p&gt;and then include this module in the models that require it. I&amp;#39;ve also&lt;br&gt;tried various combinations with &amp;#39;eval&amp;#39; and &amp;#39;send&amp;#39; etc.&lt;p&gt;The validations aren&amp;#39;t called :(&lt;p&gt;Can anyone explain why this isn&amp;#39;t working and if it&amp;#39;s possbile to re-&lt;br&gt;use validations like this?&lt;p&gt;Thanks&lt;p&gt;Gavin&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-422728722137769525?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/422728722137769525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=422728722137769525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/422728722137769525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/422728722137769525'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-how-can-i-dry-this-up.html' title='[Rails] How can I DRY this up?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-557737714047537029</id><published>2009-07-05T08:31:00.000-07:00</published><updated>2009-07-05T08:32:24.466-07:00</updated><title type='text'>[Rails] Re: Params Merge and URL sorting/pagination</title><content type='html'>On Jul 5, 10:54&amp;#160;am, &amp;quot;&amp;#196;lph&amp;#228; Bl&amp;#252;&amp;#235;&amp;quot; &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; I took a break from this issue and tried to get back to it again today.&lt;br&gt;&amp;gt; I even tried implementing hidden fields but that doesn&amp;#39;t work as&lt;br&gt;&amp;gt; expected. &amp;#160;Can anyone offer input into this issue? &amp;#160;Advice?&lt;br&gt;&amp;gt; Suggestions?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; 1. &amp;#160;What options do I have for building a form using form_tag with&lt;br&gt;&amp;gt; params.merge?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have looked through a lot of sites online and&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;% form_tag(params.merge(:compiled_on =&amp;gt; params[:compiled_on]), :method&lt;br&gt;&amp;gt; =&amp;gt; &amp;#39;get&amp;#39;) do %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;%= hinted_text_field_tag :search, params[:search], &amp;quot;Enter Team&amp;quot; %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;%= submit_tag &amp;quot;Team Search&amp;quot;, :name =&amp;gt; nil %&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;% end %&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; .. should work..&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; However, it does not. &amp;#160;I still only get search=&amp;quot;Florida&amp;quot; and I don&amp;#39;t get&lt;br&gt;&amp;gt; search=&amp;quot;florida&amp;quot;&amp;amp;compiled_on=&amp;quot;2009-07-02&amp;quot;..&lt;br&gt;&amp;gt;&lt;p&gt;If a form&amp;#39;s submission method is get, then when you submit the form&lt;br&gt;its input elements are serialized and turned into a query string. The&lt;br&gt;standard just say that a ? and this query string is appended to the&lt;br&gt;action attribute (which would probably create an invalid url such as&lt;br&gt;foo?bar=baz?search=Florida ). In practise most browsers seem to just&lt;br&gt;ignore the query string that was part of the action attribute,&lt;br&gt;although I can&amp;#39;t see anything in the standards that says this is ok&lt;br&gt;(equally I can&amp;#39;t see anything that says that the query strings need to&lt;br&gt;be concatenated in a smart way). Given that the browser is going to&lt;br&gt;junk the query string bit from the form&amp;#39;s action attribute you&amp;#39;ll need&lt;br&gt;all of your various parameters as form parameters (unless you have&lt;br&gt;routes which push those parameters into the path of the url)..&lt;p&gt;Fred&lt;p&gt;&lt;br&gt;&amp;gt; I hate bumping my own thread but either this is a very easy issue or&lt;br&gt;&amp;gt; it&amp;#39;s a very complicated issue and no one has any advice for me. &amp;#160;I&amp;#39;ve&lt;br&gt;&amp;gt; worked through this issue as far as I can by myself. &amp;#160;I need some&lt;br&gt;&amp;gt; assistance.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks.&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-557737714047537029?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/557737714047537029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=557737714047537029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/557737714047537029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/557737714047537029'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-params-merge-and-url_9111.html' title='[Rails] Re: Params Merge and URL sorting/pagination'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-867950505945952647</id><published>2009-07-05T08:11:00.001-07:00</published><updated>2009-07-05T08:11:34.976-07:00</updated><title type='text'>[Rails] Re: reassignement TCPSocket::new</title><content type='html'>On Jul 5, 8:59&amp;#160;am, JannaB &amp;lt;&lt;a href="mailto:mistressja...@hotmail.com"&gt;mistressja...@hotmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Usually, however, the channel info will remain the same. So I am&lt;br&gt;&amp;gt; wondering how I can make the socket persist from one POST/GET&lt;br&gt;&amp;gt; operation to the other, unless the channel has changed.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; And my second question is, if I someone does tell me how I can make it&lt;br&gt;&amp;gt; persist, do I run the risk of some sort of memory leaks here with&lt;br&gt;&amp;gt; this? I wonder because I have a solitary &amp;#160;TCPSocket object which would&lt;br&gt;&amp;gt; then be reassigned -- does the un-assigned old reference that socket&lt;br&gt;&amp;gt; contained go automatically out of scope and get garbage collected?&lt;br&gt;&amp;gt; Thanks, Janna B&lt;p&gt;If you reassign a variable then its old contents will eventually be&lt;br&gt;garbage collected (assuming no other references to it).&lt;br&gt;You are likely to run into other problems though here: have you&lt;br&gt;thought about concurrent users using the app at the same time, or what&lt;br&gt;happens when you have multiple mongrels / passenger instances ?&lt;p&gt;Lastly it looks like @socket is an instance variable of your&lt;br&gt;controller, since every request is served by a new controller instance&lt;br&gt;@socket will always be nil.&lt;p&gt;Fred&lt;br&gt;&amp;gt; repeatedly in my controller, naturally,&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-867950505945952647?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/867950505945952647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=867950505945952647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/867950505945952647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/867950505945952647'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-reassignement-tcpsocketnew.html' title='[Rails] Re: reassignement TCPSocket::new'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4413369787911984147</id><published>2009-07-05T08:03:00.001-07:00</published><updated>2009-07-05T08:03:40.481-07:00</updated><title type='text'>[Rails] Re: Deploying without capistrano, using git pull?</title><content type='html'>On Jul 5, 10:12&amp;#160;am, davetron5000 &amp;lt;&lt;a href="mailto:davetron5...@gmail.com"&gt;davetron5...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I&amp;#39;m NOT working on an enterprisey big time rails application; just&lt;br&gt;&amp;gt; something for my personal site.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;ve been deploying via&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; local&amp;gt; git push origin master&lt;br&gt;&amp;gt; remote&amp;gt; git pull origin&lt;br&gt;&amp;gt; remote&amp;gt; sudo /etc/init.d/httpd restart&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Trying to decide if this is sufficient, or if learning capistrano and&lt;br&gt;&amp;gt; setting that up will give me any advantages over this?&lt;br&gt;&amp;gt;&lt;br&gt;Well on a larger setup (multiple servers etc) there is no question in&lt;br&gt;my mind that you want to use something like capistrano&lt;br&gt;Even on a small one machine setup, personally I&amp;#39;d always prefer to&lt;br&gt;automate things a little more because it&amp;#39;s just too easy to update the&lt;br&gt;source but forget to run migrations and things like that.&lt;p&gt;Fred&lt;br&gt;&amp;gt; Thanks,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Dave&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4413369787911984147?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4413369787911984147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4413369787911984147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4413369787911984147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4413369787911984147'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-deploying-without-capistrano.html' title='[Rails] Re: Deploying without capistrano, using git pull?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5008166796655577822</id><published>2009-07-05T07:57:00.001-07:00</published><updated>2009-07-05T07:57:51.333-07:00</updated><title type='text'>[Rails] Re: Params Merge and URL sorting/pagination</title><content type='html'>I just wanted to add one more thing here:&lt;p&gt;&amp;lt;%= debug params %&amp;gt; shows:&lt;p&gt;--- !map:HashWithIndifferentAccess&lt;br&gt;search: florida&lt;br&gt;compiled_on: &amp;quot;2009-07-05&amp;quot;&lt;br&gt;action: index&lt;br&gt;controller: rushing_offenses&lt;p&gt;and the URL shows:&lt;p&gt;&lt;a href="http://localhost:3000/rushing_offenses?search=florida"&gt;http://localhost:3000/rushing_offenses?search=florida&lt;/a&gt;&lt;p&gt;It should show:&lt;p&gt;&lt;a href="http://localhost:3000/rushing_offenses?search=florida&amp;amp;compiled_on=2009-07-05"&gt;http://localhost:3000/rushing_offenses?search=florida&amp;amp;compiled_on=2009-07-05&lt;/a&gt;&lt;p&gt;.. using what was listed in the post before this one.&lt;p&gt;Please assist.&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5008166796655577822?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5008166796655577822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5008166796655577822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5008166796655577822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5008166796655577822'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-params-merge-and-url_1453.html' title='[Rails] Re: Params Merge and URL sorting/pagination'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2808425764065369104</id><published>2009-07-05T07:55:00.001-07:00</published><updated>2009-07-05T07:55:25.218-07:00</updated><title type='text'>[Rails] Re: RESTFUL routes strange behavior</title><content type='html'>On Jul 5, 8:33&amp;#160;am, Waheedi &amp;lt;&lt;a href="mailto:Waheed.Barghou...@gmail.com"&gt;Waheed.Barghou...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; routes.rb&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; api.resources :friends, :controller =&amp;gt; :friends, :only =&amp;gt;&lt;br&gt;&amp;gt; [:list, :exists], :collection =&amp;gt; {:list =&amp;gt; :get, :ids =&amp;gt; :get, :exists&lt;br&gt;&amp;gt; =&amp;gt; :get}&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; here is my rake routes.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; list_api_friends GET &amp;#160; &amp;#160;/api/friends/list&lt;br&gt;&amp;gt; {:controller=&amp;gt;&amp;quot;api/friends&amp;quot;, :action=&amp;gt;&amp;quot;list&amp;quot;}&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; formatted_list_api_friends GET &amp;#160; &amp;#160;/api/friends/&lt;br&gt;&amp;gt; list.:format &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; {:controller=&amp;gt;&amp;quot;api/&lt;br&gt;&amp;gt; friends&amp;quot;, :action=&amp;gt;&amp;quot;list&amp;quot;}&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; this is the only accepted calls for controller =&amp;gt; friends &amp;#160;action =&amp;gt;&lt;br&gt;&amp;gt; list , so when calling&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; curl -X POSThttp://localhost/api/friends/list.xmlshould return&lt;br&gt;&amp;gt; routing error but instead of that it returns the list as if was a GET&lt;br&gt;&amp;gt; request...&lt;br&gt;&amp;gt;&lt;br&gt;Do you still have the default route at the bottom of routes.rb ?&lt;p&gt;Fred&lt;br&gt;&amp;gt; any suggestions&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2808425764065369104?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2808425764065369104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2808425764065369104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2808425764065369104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2808425764065369104'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-restful-routes-strange.html' title='[Rails] Re: RESTFUL routes strange behavior'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7192777052968380810</id><published>2009-07-05T07:54:00.001-07:00</published><updated>2009-07-05T07:54:31.089-07:00</updated><title type='text'>[Rails] Re: Params Merge and URL sorting/pagination</title><content type='html'>I took a break from this issue and tried to get back to it again today. &lt;br&gt;I even tried implementing hidden fields but that doesn&amp;#39;t work as &lt;br&gt;expected.  Can anyone offer input into this issue?  Advice? &lt;br&gt;Suggestions?&lt;p&gt;1.  What options do I have for building a form using form_tag with &lt;br&gt;params.merge?&lt;p&gt;I have looked through a lot of sites online and&lt;p&gt;&amp;lt;% form_tag(params.merge(:compiled_on =&amp;gt; params[:compiled_on]), :method &lt;br&gt;=&amp;gt; &amp;#39;get&amp;#39;) do %&amp;gt;&lt;br&gt;  &amp;lt;%= hinted_text_field_tag :search, params[:search], &amp;quot;Enter Team&amp;quot; %&amp;gt;&lt;br&gt;  &amp;lt;%= submit_tag &amp;quot;Team Search&amp;quot;, :name =&amp;gt; nil %&amp;gt;&lt;br&gt;&amp;lt;% end %&amp;gt;&lt;p&gt;.. should work..&lt;p&gt;However, it does not.  I still only get search=&amp;quot;Florida&amp;quot; and I don&amp;#39;t get &lt;br&gt;search=&amp;quot;florida&amp;quot;&amp;amp;compiled_on=&amp;quot;2009-07-02&amp;quot;..&lt;p&gt;I hate bumping my own thread but either this is a very easy issue or &lt;br&gt;it&amp;#39;s a very complicated issue and no one has any advice for me.  I&amp;#39;ve &lt;br&gt;worked through this issue as far as I can by myself.  I need some &lt;br&gt;assistance.&lt;p&gt;Thanks.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7192777052968380810?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7192777052968380810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7192777052968380810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7192777052968380810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7192777052968380810'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-params-merge-and-url_05.html' title='[Rails] Re: Params Merge and URL sorting/pagination'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4041426631657674533</id><published>2009-07-05T07:52:00.001-07:00</published><updated>2009-07-05T07:52:38.932-07:00</updated><title type='text'>[Rails] Re: How to Synchronize?</title><content type='html'>On Jul 2, 11:10&amp;#160;am, Onur Gungor &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; First I suspected that this problem is originating because Passenger was&lt;br&gt;&amp;gt; spawning processes and they are not sharing the mutex. But I checked the&lt;br&gt;&amp;gt; documentation but couldn&amp;#39;t find a mention of it. And in this link&lt;br&gt;&amp;gt; (&lt;a href="http://m.onkey.org/2008/10/23/thread-safety-for-your-rails"&gt;http://m.onkey.org/2008/10/23/thread-safety-for-your-rails&lt;/a&gt;) it says&lt;br&gt;&amp;gt; that it&amp;#39;s OK to use Mutexes (though not mentioning the multiprocess&lt;br&gt;&amp;gt; passenger).&lt;br&gt;&amp;gt;&lt;p&gt;Mutexes aren&amp;#39;t for cross process synchronisation (unlike a mutex in&lt;br&gt;windows which can be shared across processes).&lt;p&gt;Fred&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4041426631657674533?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4041426631657674533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4041426631657674533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4041426631657674533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4041426631657674533'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-synchronize.html' title='[Rails] Re: How to Synchronize?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7427912395203142622</id><published>2009-07-05T07:12:00.001-07:00</published><updated>2009-07-05T07:12:59.851-07:00</updated><title type='text'>[Rails] Deploying without capistrano, using git pull?</title><content type='html'>I&amp;#39;m NOT working on an enterprisey big time rails application; just&lt;br&gt;something for my personal site.&lt;p&gt;I&amp;#39;ve been deploying via&lt;p&gt;local&amp;gt; git push origin master&lt;br&gt;remote&amp;gt; git pull origin&lt;br&gt;remote&amp;gt; sudo /etc/init.d/httpd restart&lt;p&gt;Trying to decide if this is sufficient, or if learning capistrano and&lt;br&gt;setting that up will give me any advantages over this?&lt;p&gt;&lt;br&gt;Thanks,&lt;p&gt;Dave&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7427912395203142622?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7427912395203142622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7427912395203142622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7427912395203142622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7427912395203142622'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-deploying-without-capistrano.html' title='[Rails] Deploying without capistrano, using git pull?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5217819794308492953</id><published>2009-07-05T05:59:00.001-07:00</published><updated>2009-07-05T05:59:22.897-07:00</updated><title type='text'>[Rails] reassignement TCPSocket::new</title><content type='html'>in my model, I have:&lt;p&gt;attr_accessor :socket&lt;p&gt;in my controller I have&lt;p&gt;def toServer(s)&lt;br&gt;    begin&lt;br&gt;      if(@socket == nil)&lt;br&gt;        @socket = TCPSocket::new(@channel.serverip, @channel.port)&lt;br&gt;      end&lt;br&gt;     @socket.send(s,0)&lt;br&gt;    rescue&lt;br&gt;      return&lt;br&gt;    end&lt;br&gt;  end&lt;p&gt;I have a dropdown list in the view that lets the user select a&lt;br&gt;different channel, thus, the socket is created in the view based on&lt;br&gt;the ip and port of the selected channel.&lt;p&gt;Usually, however, the channel info will remain the same. So I am&lt;br&gt;wondering how I can make the socket persist from one POST/GET&lt;br&gt;operation to the other, unless the channel has changed.&lt;p&gt;And my second question is, if I someone does tell me how I can make it&lt;br&gt;persist, do I run the risk of some sort of memory leaks here with&lt;br&gt;this? I wonder because I have a solitary  TCPSocket object which would&lt;br&gt;then be reassigned -- does the un-assigned old reference that socket&lt;br&gt;contained go automatically out of scope and get garbage collected?&lt;br&gt;Thanks, Janna B&lt;br&gt;repeatedly in my controller, naturally,&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5217819794308492953?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5217819794308492953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5217819794308492953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5217819794308492953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5217819794308492953'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-reassignement-tcpsocketnew.html' title='[Rails] reassignement TCPSocket::new'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5510836290228826424</id><published>2009-07-05T05:33:00.000-07:00</published><updated>2009-07-05T07:48:28.419-07:00</updated><title type='text'>[Rails] RESTFUL routes strange behavior</title><content type='html'>routes.rb&lt;p&gt;api.resources :friends, :controller =&amp;gt; :friends, :only =&amp;gt;&lt;br&gt;[:list, :exists], :collection =&amp;gt; {:list =&amp;gt; :get, :ids =&amp;gt; :get, :exists&lt;br&gt;=&amp;gt; :get}&lt;p&gt;here is my rake routes.&lt;p&gt;list_api_friends GET    /api/friends/list&lt;br&gt;{:controller=&amp;gt;&amp;quot;api/friends&amp;quot;, :action=&amp;gt;&amp;quot;list&amp;quot;}&lt;p&gt;formatted_list_api_friends GET    /api/friends/&lt;br&gt;list.:format               {:controller=&amp;gt;&amp;quot;api/&lt;br&gt;friends&amp;quot;, :action=&amp;gt;&amp;quot;list&amp;quot;}&lt;p&gt;this is the only accepted calls for controller =&amp;gt; friends  action =&amp;gt;&lt;br&gt;list , so when calling&lt;p&gt;curl -X POST &lt;a href="http://localhost/api/friends/list.xml"&gt;http://localhost/api/friends/list.xml&lt;/a&gt; should return&lt;br&gt;routing error but instead of that it returns the list as if was a GET&lt;br&gt;request...&lt;p&gt;any suggestions&lt;p&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5510836290228826424?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5510836290228826424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5510836290228826424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5510836290228826424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5510836290228826424'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-restful-routes-strange-behavior.html' title='[Rails] RESTFUL routes strange behavior'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-217121642618593016</id><published>2009-07-05T04:49:00.001-07:00</published><updated>2009-07-05T04:49:43.620-07:00</updated><title type='text'>[Rails] Re: php =&gt; rails (JSON)</title><content type='html'>Magnificent! Thank you Conrad!&lt;p&gt;On Jul 5, 1:30&amp;#160;am, Conrad Taylor &amp;lt;&lt;a href="mailto:conra...@gmail.com"&gt;conra...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; On Sat, Jul 4, 2009 at 10:26 PM, Conrad Taylor &amp;lt;&lt;a href="mailto:conra...@gmail.com"&gt;conra...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; &amp;gt; On Sat, Jul 4, 2009 at 7:12 PM, JannaB &amp;lt;&lt;a href="mailto:mistressja...@hotmail.com"&gt;mistressja...@hotmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I have an application that creates a snippet of php in a server, fo&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; packaging up data for JSON, using the php package &amp;quot;Pear.&amp;quot; The snippet&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I create (with varying data, of course, as the application runs) is&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; written in php, but I really want to keep things rails-centric. Is&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; there a way to convert this to NOT use php, so that I am entirely Ruby&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; on Rails? Thanks, Janna B&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;?php&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ini_set(&amp;#39;include_path&amp;#39;,ini_get(&amp;#39;include_path&amp;#39;).&amp;quot;;C:\Program Files&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; \Apache Group\Apache2\htdocs&amp;quot;.&amp;quot;\pear&amp;quot;);&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; require(&amp;#39;JSON.php&amp;#39;);&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; $records=array();&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; $records[]=array(&amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39;);&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; $json=new Services_JSON();&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; echo($json-&amp;gt;encode($records));&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ?&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Janna, the above PHP code simply converts a PHP array to JSON format.&lt;br&gt;&amp;gt; &amp;gt; Thus, you can do the equivalent in Ruby as follows:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; require &amp;quot;json&amp;quot;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; records = { order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39; }.to_json&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Correction:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; require &amp;quot;json&amp;quot;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; records = { &amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39; }.to_json &amp;#160;# Missed the leading&lt;br&gt;&amp;gt; quote&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Good luck,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; -Conrad&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-217121642618593016?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/217121642618593016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=217121642618593016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/217121642618593016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/217121642618593016'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-php-rails-json_05.html' title='[Rails] Re: php =&gt; rails (JSON)'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2417123552892833990</id><published>2009-07-05T02:14:00.002-07:00</published><updated>2009-07-05T02:15:12.009-07:00</updated><title type='text'>[Rails] Re: Not sure how to do this</title><content type='html'>Now that I read again, scoped won&amp;#39;t allow destroy_all to get through, but I still stand by my point :)&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Sun, Jul 5, 2009 at 5:14 AM, Pat Nakajima &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:patnakajima@gmail.com"&gt;patnakajima@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt;That works, though it&amp;#39;s definitely a good idea to sanitize which params can be used in such a manner. Otherwise, someone could send params like { :destroy_all =&amp;gt; true } or something, and then there goes your database.&lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#888888"&gt;Pat&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="h5"&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 1:07 PM, Matt Jones &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:al2o3cr@gmail.com" target="_blank"&gt;al2o3cr@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;br&gt; You could try building up a chain of scopes - see this post:&lt;br&gt; &lt;br&gt; &lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91&lt;/a&gt;&lt;br&gt;   &lt;br&gt; As noted there, you can avoid cluttering up your model by using&lt;br&gt; &amp;#39;scoped&amp;#39; to create anonymous scopes.&lt;br&gt; &lt;br&gt; So your example would look like:&lt;br&gt; &lt;br&gt; # in the controller action&lt;br&gt; proxy = Machine&lt;br&gt; [:attr1, :attr2, :attr3].each do { |k|&lt;br&gt;   proxy = proxy.scoped(:conditions =&amp;gt; Hash[k, params[k]]) unless params&lt;br&gt; [k].blank?&lt;br&gt; }&lt;br&gt; @machines = proxy.find(:all)&lt;br&gt; &lt;br&gt; That last find can also be a paginate, have limits, sorts, etc.&lt;br&gt; &lt;font color="#888888"&gt;&lt;br&gt; --Matt Jones&lt;br&gt; &lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt; On Jul 2, 5:42 pm, jhaagmans &amp;lt;&lt;a href="mailto:jaap.haagm...@gmail.com" target="_blank"&gt;jaap.haagm...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; In an app I&amp;#39;m working on, I want to have a filter in which you can&lt;br&gt; &amp;gt; specify certain attributes and click &amp;quot;filter&amp;quot; to activate an AJAX&lt;br&gt; &amp;gt; request and return a list of, say, machines that match with those&lt;br&gt; &amp;gt; attributes.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; No I&amp;#39;m not sure how to build the controller.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; If I would specify all the attributes, I would simply do:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; def filter&lt;br&gt; &amp;gt;   @machines = Machine.find(:all, :conditions =&amp;gt; { :attr_1 =&amp;gt; params&lt;br&gt; &amp;gt; [:attr_1], :attr_2 ... }&lt;br&gt; &amp;gt; end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; But how would I do this if only some of the attributes are specified&lt;br&gt; &amp;gt; and the others are nil? Would I have to create @machines including all&lt;br&gt; &amp;gt; machines and have Rails do the rest of the work or is there a way to&lt;br&gt; &amp;gt; get find to do what I want?&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2417123552892833990?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2417123552892833990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2417123552892833990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2417123552892833990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2417123552892833990'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-not-sure-how-to-do-this_1674.html' title='[Rails] Re: Not sure how to do this'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1721390546829214128</id><published>2009-07-05T02:14:00.001-07:00</published><updated>2009-07-05T02:14:55.062-07:00</updated><title type='text'>[Rails] Re: Not sure how to do this</title><content type='html'>That works, though it&amp;#39;s definitely a good idea to sanitize which params can be used in such a manner. Otherwise, someone could send params like { :destroy_all =&amp;gt; true } or something, and then there goes your database.&lt;div&gt; &lt;br&gt;&lt;/div&gt;&lt;div&gt;Pat&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 1:07 PM, Matt Jones &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:al2o3cr@gmail.com"&gt;al2o3cr@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;br&gt; You could try building up a chain of scopes - see this post:&lt;br&gt; &lt;br&gt; &lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91&lt;/a&gt;&lt;br&gt;  &lt;br&gt; As noted there, you can avoid cluttering up your model by using&lt;br&gt; &amp;#39;scoped&amp;#39; to create anonymous scopes.&lt;br&gt; &lt;br&gt; So your example would look like:&lt;br&gt; &lt;br&gt; # in the controller action&lt;br&gt; proxy = Machine&lt;br&gt; [:attr1, :attr2, :attr3].each do { |k|&lt;br&gt;   proxy = proxy.scoped(:conditions =&amp;gt; Hash[k, params[k]]) unless params&lt;br&gt; [k].blank?&lt;br&gt; }&lt;br&gt; @machines = proxy.find(:all)&lt;br&gt; &lt;br&gt; That last find can also be a paginate, have limits, sorts, etc.&lt;br&gt; &lt;font color="#888888"&gt;&lt;br&gt; --Matt Jones&lt;br&gt; &lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="h5"&gt;&lt;br&gt; On Jul 2, 5:42 pm, jhaagmans &amp;lt;&lt;a href="mailto:jaap.haagm...@gmail.com"&gt;jaap.haagm...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; In an app I&amp;#39;m working on, I want to have a filter in which you can&lt;br&gt; &amp;gt; specify certain attributes and click &amp;quot;filter&amp;quot; to activate an AJAX&lt;br&gt; &amp;gt; request and return a list of, say, machines that match with those&lt;br&gt; &amp;gt; attributes.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; No I&amp;#39;m not sure how to build the controller.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; If I would specify all the attributes, I would simply do:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; def filter&lt;br&gt; &amp;gt;   @machines = Machine.find(:all, :conditions =&amp;gt; { :attr_1 =&amp;gt; params&lt;br&gt; &amp;gt; [:attr_1], :attr_2 ... }&lt;br&gt; &amp;gt; end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; But how would I do this if only some of the attributes are specified&lt;br&gt; &amp;gt; and the others are nil? Would I have to create @machines including all&lt;br&gt; &amp;gt; machines and have Rails do the rest of the work or is there a way to&lt;br&gt; &amp;gt; get find to do what I want?&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1721390546829214128?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1721390546829214128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1721390546829214128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1721390546829214128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1721390546829214128'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-not-sure-how-to-do-this_05.html' title='[Rails] Re: Not sure how to do this'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7974412457290639008</id><published>2009-07-05T00:44:00.000-07:00</published><updated>2009-07-05T00:45:09.921-07:00</updated><title type='text'>[Rails] Re: prevent orphan records</title><content type='html'>Jeffrey:&lt;p&gt;Thank you.  I tried that but it still didn&amp;#39;t work.  So I have this&lt;p&gt;class Stat &amp;lt; ActiveRecord::Base&lt;p&gt;  belongs_to :user&lt;br&gt;  validates_presence_of   :user_id&lt;br&gt;  validates_associated    :user&lt;p&gt;&lt;br&gt;The user table is empty.  I then create a stat with user_id = 99, which &lt;br&gt;does not exist in the user table.  No error is produced:&lt;p&gt;Loading development environment (Rails 2.3.2)&lt;br&gt;&amp;gt;&amp;gt; stat = Stat.new(:user_id =&amp;gt; 99)&lt;br&gt;=&amp;gt; #&amp;lt;Stat id: nil, user_id: 99, ...&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; stat.save!&lt;br&gt;=&amp;gt; true&lt;br&gt;&amp;gt;&amp;gt; &lt;p&gt;A new record with user_id = 99 was created in the database although the &lt;br&gt;associated user does not exist.  Perhaps this validation only validates &lt;br&gt;the associated user when that user exists.  See API: &lt;br&gt;&lt;a href="http://apidock.com/rails/ActiveModel/Validations/ClassMethods/validates_associated"&gt;http://apidock.com/rails/ActiveModel/Validations/ClassMethods/validates_associated&lt;/a&gt;&lt;p&gt;Did I read it right?&lt;p&gt;Thanks.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7974412457290639008?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7974412457290639008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7974412457290639008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7974412457290639008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7974412457290639008'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-prevent-orphan-records_05.html' title='[Rails] Re: prevent orphan records'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5883238187121667650</id><published>2009-07-04T23:28:00.001-07:00</published><updated>2009-07-04T23:28:53.863-07:00</updated><title type='text'>[Rails] tell me how to rectify this error</title><content type='html'>hi i am using this command to scaffold&lt;p&gt;G:\my\webblog&amp;gt;ruby script/generate scaffold Comments comments:text&lt;p&gt;but i got the folllwoing error, can any one help to rectify htis&lt;br&gt;problam........&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5883238187121667650?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5883238187121667650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5883238187121667650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5883238187121667650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5883238187121667650'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-tell-me-how-to-rectify-this-error.html' title='[Rails] tell me how to rectify this error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2961702641548882150</id><published>2009-07-04T22:56:00.000-07:00</published><updated>2009-07-04T22:57:07.167-07:00</updated><title type='text'>[Rails] Re: distance_of_time_in_words fails in test</title><content type='html'>Actually, I was looking at the parameters in the wrong order.  I need&lt;br&gt;the - operator from the to_date wich is the TimeWithZone.  That&amp;#39;s&lt;br&gt;defined here:&lt;p&gt;    def -(other)&lt;br&gt;      # If we&amp;#39;re subtracting a Duration of variable length (i.e.,&lt;br&gt;years, months, days), move backwards from #time,&lt;br&gt;      # otherwise move backwards #utc, for accuracy when moving across&lt;br&gt;DST boundaries&lt;br&gt;      if other.acts_like?(:time)&lt;br&gt;        utc - other&lt;br&gt;      elsif duration_of_variable_length?(other)&lt;br&gt;        method_missing(:-, other)&lt;br&gt;      else&lt;br&gt;        result = utc.acts_like?(:date) ? utc.ago(other) : utc - other&lt;br&gt;rescue utc.ago(other)&lt;br&gt;        result.in_time_zone(time_zone)&lt;br&gt;      end&lt;br&gt;    end&lt;p&gt;The rails console tells me I should hit the first condition, resulting&lt;br&gt;in a Time (which doesn&amp;#39;t support abs).  I still haven&amp;#39;t found the&lt;br&gt;magic that makes this work in production.&lt;p&gt;Loading development environment (Rails 2.2.2)&lt;br&gt;&amp;gt;&amp;gt; a = DateTime.now&lt;br&gt;=&amp;gt; Sun, 05 Jul 2009 01:55:13 -0400&lt;br&gt;&amp;gt;&amp;gt; a.class&lt;br&gt;=&amp;gt; DateTime&lt;br&gt;&amp;gt;&amp;gt; b = Time.zone.now&lt;br&gt;=&amp;gt; Sun, 05 Jul 2009 05:55:31 UTC +00:00&lt;br&gt;&amp;gt;&amp;gt; b.class&lt;br&gt;=&amp;gt; ActiveSupport::TimeWithZone&lt;br&gt;&amp;gt;&amp;gt; c=b-a&lt;br&gt;=&amp;gt; Thu Jan 01 00:00:18 UTC 1970&lt;br&gt;&amp;gt;&amp;gt; c.class&lt;br&gt;=&amp;gt; Time&lt;br&gt;&amp;gt;&amp;gt;&lt;p&gt;On Jul 5, 1:02&amp;#160;am, Brian &amp;lt;&lt;a href="mailto:butler.bria...@gmail.com"&gt;butler.bria...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I have a DateTime object (from DateTime.now), and an&lt;br&gt;&amp;gt; ActiveSupport::TimeWithZone object (comes from a date in the DB). &amp;#160;I&amp;#39;m&lt;br&gt;&amp;gt; passing these values to the helper method distance_of_time_in_words:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;%= distance_of_time_in_words(DateTime.now, @myinstance.mydate) %&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; In the implementation of this helper is the following:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; distance_in_minutes = (((to_time - from_time).abs)/60).round&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; In production, this works as expected. In testing, this results in:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; ActionView::TemplateError: undefined method `abs&amp;#39; for Sun Oct 26&lt;br&gt;&amp;gt; 19:49:44 UTC 1980:Time&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Here&amp;#39;s where it gets strange. &amp;#160;I opened this up in the debugger in&lt;br&gt;&amp;gt; both environments. &amp;#160;In test, a DateTime minus a TimeWithZone gives me&lt;br&gt;&amp;gt; a Time. &amp;#160;Time doesn&amp;#39;t have an abs method, so this fails with a&lt;br&gt;&amp;gt; NoMethod exception. &amp;#160;In production a DateTime minus a TimeWithZone&lt;br&gt;&amp;gt; results in a Rational, which does have abs!&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Why the different behavior in these two environments? &amp;#160;I don&amp;#39;t see the&lt;br&gt;&amp;gt; DateTime minus operator being redefined by rails anywhere, but maybe&lt;br&gt;&amp;gt; I&amp;#39;m not looking in the right place. &amp;#160;I&amp;#39;m using Rails version 2.2.2.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2961702641548882150?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2961702641548882150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2961702641548882150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2961702641548882150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2961702641548882150'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-distanceoftimeinwords-fails-in.html' title='[Rails] Re: distance_of_time_in_words fails in test'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4975542518586773</id><published>2009-07-04T22:30:00.001-07:00</published><updated>2009-07-04T22:30:49.906-07:00</updated><title type='text'>[Rails] Re: php =&gt; rails (JSON)</title><content type='html'>&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 10:26 PM, Conrad Taylor &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:conradwt@gmail.com"&gt;conradwt@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;div class="gmail_quote"&gt;&lt;div class="im"&gt;On Sat, Jul 4, 2009 at 7:12 PM, JannaB &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:mistressjanna@hotmail.com" target="_blank"&gt;mistressjanna@hotmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;  &lt;br&gt; I have an application that creates a snippet of php in a server, for&lt;br&gt; packaging up data for JSON, using the php package &amp;quot;Pear.&amp;quot; The snippet&lt;br&gt; I create (with varying data, of course, as the application runs) is&lt;br&gt; written in php, but I really want to keep things rails-centric. Is&lt;br&gt; there a way to convert this to NOT use php, so that I am entirely Ruby&lt;br&gt; on Rails? Thanks, Janna B&lt;br&gt; &lt;br&gt; &amp;lt;?php&lt;br&gt; ini_set(&amp;#39;include_path&amp;#39;,ini_get(&amp;#39;include_path&amp;#39;).&amp;quot;;C:\Program Files&lt;br&gt; \Apache Group\Apache2\htdocs&amp;quot;.&amp;quot;\pear&amp;quot;);&lt;br&gt; require(&amp;#39;JSON.php&amp;#39;);&lt;br&gt; &lt;br&gt; $records=array();&lt;br&gt; $records[]=array(&amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39;);&lt;br&gt; $json=new Services_JSON();&lt;br&gt; echo($json-&amp;gt;encode($records));&lt;br&gt; ?&amp;gt;&lt;br&gt; &lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Janna, the above PHP code simply converts a PHP array to JSON format.  &lt;/div&gt;&lt;div&gt;Thus, you can do the equivalent in Ruby as follows:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;require &amp;quot;json&amp;quot;&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;records = { order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39; }.to_json&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Correction:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;require &amp;quot;json&amp;quot; &lt;/div&gt;&lt;div&gt;&lt;br&gt; &lt;/div&gt;&lt;div&gt;records = { &amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39; }.to_json  # Missed the leading quote&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;div class="gmail_quote"&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Good luck,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Conrad&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4975542518586773?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4975542518586773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4975542518586773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4975542518586773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4975542518586773'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-php-rails-json_04.html' title='[Rails] Re: php =&gt; rails (JSON)'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3181118144008542871</id><published>2009-07-04T22:26:00.000-07:00</published><updated>2009-07-04T22:27:11.582-07:00</updated><title type='text'>[Rails] Re: php =&gt; rails (JSON)</title><content type='html'>&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 7:12 PM, JannaB &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:mistressjanna@hotmail.com"&gt;mistressjanna@hotmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;br&gt; I have an application that creates a snippet of php in a server, for&lt;br&gt; packaging up data for JSON, using the php package &amp;quot;Pear.&amp;quot; The snippet&lt;br&gt; I create (with varying data, of course, as the application runs) is&lt;br&gt; written in php, but I really want to keep things rails-centric. Is&lt;br&gt; there a way to convert this to NOT use php, so that I am entirely Ruby&lt;br&gt; on Rails? Thanks, Janna B&lt;br&gt; &lt;br&gt; &amp;lt;?php&lt;br&gt; ini_set(&amp;#39;include_path&amp;#39;,ini_get(&amp;#39;include_path&amp;#39;).&amp;quot;;C:\Program Files&lt;br&gt; \Apache Group\Apache2\htdocs&amp;quot;.&amp;quot;\pear&amp;quot;);&lt;br&gt; require(&amp;#39;JSON.php&amp;#39;);&lt;br&gt; &lt;br&gt; $records=array();&lt;br&gt; $records[]=array(&amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39;);&lt;br&gt; $json=new Services_JSON();&lt;br&gt; echo($json-&amp;gt;encode($records));&lt;br&gt; ?&amp;gt;&lt;br&gt; &lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Janna, the above PHP code simply converts a PHP array to JSON format.  &lt;/div&gt;&lt;div&gt;Thus, you can do the equivalent in Ruby as follows:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;require &amp;quot;json&amp;quot;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;records = { order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39; }.to_json&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Good luck,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Conrad&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3181118144008542871?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3181118144008542871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3181118144008542871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3181118144008542871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3181118144008542871'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-php-rails-json.html' title='[Rails] Re: php =&gt; rails (JSON)'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6519372747095712834</id><published>2009-07-04T22:02:00.001-07:00</published><updated>2009-07-04T22:02:19.262-07:00</updated><title type='text'>[Rails] distance_of_time_in_words fails in test</title><content type='html'>I have a DateTime object (from DateTime.now), and an&lt;br&gt;ActiveSupport::TimeWithZone object (comes from a date in the DB).  I&amp;#39;m&lt;br&gt;passing these values to the helper method distance_of_time_in_words:&lt;p&gt;  &amp;lt;%= distance_of_time_in_words(DateTime.now, @myinstance.mydate) %&amp;gt;&lt;p&gt;In the implementation of this helper is the following:&lt;p&gt;  distance_in_minutes = (((to_time - from_time).abs)/60).round&lt;p&gt;In production, this works as expected. In testing, this results in:&lt;p&gt;  ActionView::TemplateError: undefined method `abs&amp;#39; for Sun Oct 26&lt;br&gt;19:49:44 UTC 1980:Time&lt;p&gt;Here&amp;#39;s where it gets strange.  I opened this up in the debugger in&lt;br&gt;both environments.  In test, a DateTime minus a TimeWithZone gives me&lt;br&gt;a Time.  Time doesn&amp;#39;t have an abs method, so this fails with a&lt;br&gt;NoMethod exception.  In production a DateTime minus a TimeWithZone&lt;br&gt;results in a Rational, which does have abs!&lt;p&gt;Why the different behavior in these two environments?  I don&amp;#39;t see the&lt;br&gt;DateTime minus operator being redefined by rails anywhere, but maybe&lt;br&gt;I&amp;#39;m not looking in the right place.  I&amp;#39;m using Rails version 2.2.2.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6519372747095712834?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6519372747095712834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6519372747095712834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6519372747095712834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6519372747095712834'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-distanceoftimeinwords-fails-in.html' title='[Rails] distance_of_time_in_words fails in test'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6836043760774933717</id><published>2009-07-04T21:13:00.001-07:00</published><updated>2009-07-04T21:13:44.380-07:00</updated><title type='text'>[Rails] Re: Password needed to view atom feed</title><content type='html'>On Sat, Jul 4, 2009 at 10:27 AM, Aaron&lt;br&gt;Day&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160;I have a before_filter in the controller where the atom feed is coming&lt;br&gt;&amp;gt; from. I want it to check the password when entering that area but not&lt;br&gt;&amp;gt; when a user wants to view the rss feed. Is there a way I can use the&lt;br&gt;&amp;gt; :except here? It&amp;#39;s the before_filter on index that makes this happen.&lt;p&gt;Is the RSS feed generated within the index action?&lt;br&gt;I tend to find that if I&amp;#39;m exposing a feed, it usually contains the&lt;br&gt;same info as the index action (although I might have to hide some&lt;br&gt;links from non-authenticated users)&lt;br&gt;Therefore, I can just do :except =&amp;gt; :index&lt;p&gt;If you need to keep index locked down, move your feed to a feed action&lt;br&gt;and expose that using :except =&amp;gt; :feed&lt;p&gt;Andrew Timberlake&lt;br&gt;&lt;a href="http://ramblingsonrails.com"&gt;http://ramblingsonrails.com&lt;/a&gt;&lt;p&gt;&lt;a href="http://MyMvelope.com"&gt;http://MyMvelope.com&lt;/a&gt; - The SIMPLE way to manage your savings&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6836043760774933717?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6836043760774933717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6836043760774933717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6836043760774933717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6836043760774933717'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-password-needed-to-view-atom.html' title='[Rails] Re: Password needed to view atom feed'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2514113379825848304</id><published>2009-07-04T21:00:00.001-07:00</published><updated>2009-07-04T21:00:36.341-07:00</updated><title type='text'>[Rails] How do I generate dynamic items dynamically?</title><content type='html'>Hi All,&lt;p&gt;I&amp;#39;m looking for a way to append elements with javascript using&lt;br&gt;javascript.  Basically I have two lists of items.  One has a list of&lt;br&gt;items with an &amp;quot;ADD&amp;quot; button (using &amp;quot;link_to_remote&amp;quot;) and the other has&lt;br&gt;a list of items with a &amp;quot;REMOVE&amp;quot; button (using &amp;quot;link_to_remote&amp;quot;).  When&lt;br&gt;I click the &amp;quot;ADD&amp;quot; it immediately places the item into the other list.&lt;br&gt;However, I need to be able to have the newly inserted item perform the&lt;br&gt;reverse action for &amp;quot;REMOVE&amp;quot;.&lt;p&gt;I see no way (besides, perhaps creating a partial to render a non-&lt;br&gt;object) to dynamically generate dynamic items of this nature.&lt;p&gt;Any ideas?&lt;p&gt;&lt;br&gt;Best.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2514113379825848304?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2514113379825848304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2514113379825848304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2514113379825848304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2514113379825848304'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-how-do-i-generate-dynamic-items.html' title='[Rails] How do I generate dynamic items dynamically?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4624990236523772506</id><published>2009-07-04T20:53:00.001-07:00</published><updated>2009-07-04T20:53:42.101-07:00</updated><title type='text'>[Rails] Re: prevent orphan records</title><content type='html'>Quoting Learn By Doing &amp;lt;&lt;a href="mailto:easebus@gmail.com"&gt;easebus@gmail.com&lt;/a&gt;&amp;gt;:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Hi Colin,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; After reading the API, I think that&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;      validates_presence_of   :user_id&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; will not even check to make sure that the user exists in the user&lt;br&gt;&amp;gt; table.  It only makes sure that the field value is not blank:&lt;br&gt;&amp;gt; &lt;a href="http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/validates_presence_of"&gt;http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/validates_presence_of&lt;/a&gt;.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; So this validation does not do the work of a proper foreign key&lt;br&gt;&amp;gt; constraint.  Am I reading the API incorrectly?&lt;br&gt;&amp;gt; &lt;p&gt;Yes, there is another validation to verify that the associated object exists&lt;br&gt;and is valid, validates_associated.&lt;p&gt;HTH,&lt;br&gt;  Jeffrey&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4624990236523772506?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4624990236523772506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4624990236523772506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4624990236523772506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4624990236523772506'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-prevent-orphan-records_9095.html' title='[Rails] Re: prevent orphan records'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-57745747587409477</id><published>2009-07-04T20:51:00.000-07:00</published><updated>2009-07-04T20:52:17.256-07:00</updated><title type='text'>[Rails] Re: RJS error ("Can't find variable: point") not providing sufficient  information.</title><content type='html'>Wow.  Nevermind.  Was a case of attempting to follow an example too&lt;br&gt;closely.  Literalism FAIL!  After adjusting my &amp;quot;:with&amp;quot; to &amp;quot;point = #&lt;br&gt;{domid}&amp;quot; everything worked.&lt;p&gt;On Jul 4, 11:45&amp;#160;pm, gberz3 &amp;lt;&lt;a href="mailto:gbe...@gmail.com"&gt;gbe...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi All,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;m having an issue with rails involving javascript. &amp;#160;Basically, I&lt;br&gt;&amp;gt; have the following code:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;ul id=&amp;quot;all-points&amp;quot;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;%for point in Point.find(:all)%&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;%domid = &amp;quot;point[all][#{&lt;a href="http://point.id"&gt;point.id&lt;/a&gt;}]&amp;quot;%&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;li class=&amp;quot;available-point&amp;quot; id=&amp;#39;&amp;lt;%=domid%&amp;gt;&amp;#39;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;span&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;%= link_to_remote &amp;quot;ADD&amp;quot;,:url =&amp;gt; {:action =&amp;gt; &amp;quot;add_point&amp;quot;},&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :html =&amp;gt; {:style =&amp;gt; &amp;quot;background: wheat; color: gray; text-&lt;br&gt;&amp;gt; decoration: none; border: 1px solid gray;&amp;quot;},&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :with =&amp;gt; &amp;quot;&amp;#39;point=&amp;#39; + #{domid}&amp;quot;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;/span&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; (&amp;lt;%=point.source%&amp;gt;) &amp;amp;nbsp &amp;lt;%=&lt;a href="http://point.name"&gt;point.name&lt;/a&gt;%&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;/li&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;%= draggable_element(domid, :ghosting =&amp;gt; true, :revert =&amp;gt;&lt;br&gt;&amp;gt; true, :scroll =&amp;gt; &amp;quot;window&amp;quot;)%&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;%end%&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;/ul&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; However, I keep receiving RJS errors telling me &amp;quot;Can&amp;#39;t find variable:&lt;br&gt;&amp;gt; point&amp;quot;. &amp;#160;The error has something to do with DOMID as when I change the&lt;br&gt;&amp;gt; word &amp;quot;point&amp;quot; to &amp;quot;alksdjflksdjfls&amp;quot; (a.k.a. garbage), it warns me about&lt;br&gt;&amp;gt; the garbage name. &amp;#160;I&amp;#39;m admittedly rusty when it comes to Javascript,&lt;br&gt;&amp;gt; but this error doesn&amp;#39;t seem to give enough info. &amp;#160;Can someone please&lt;br&gt;&amp;gt; tell me what is wrong with my code?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; FYI, the error comes in my controller when I say:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; def add_point&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160;render :update do |page|&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;page.insert_html :bottom, &amp;quot;selected-points&amp;quot;, &amp;quot;&amp;lt;li&amp;gt;test phrase&amp;lt;/&lt;br&gt;&amp;gt; li&amp;gt;&amp;quot;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;page.remove params[:point] &amp;#160;#error occurs here&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160;end&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;ve tried encodeURIComponent as well, but nothing seems to matter.&lt;br&gt;&amp;gt; Also, I&amp;#39;m using both Safari and Firefox to debug. &amp;#160;Thoughts?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Best.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-57745747587409477?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/57745747587409477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=57745747587409477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/57745747587409477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/57745747587409477'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rjs-error-cant-find-variable.html' title='[Rails] Re: RJS error (&quot;Can&apos;t find variable: point&quot;) not providing sufficient  information.'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1736166540600330197</id><published>2009-07-04T20:45:00.001-07:00</published><updated>2009-07-04T20:45:31.307-07:00</updated><title type='text'>[Rails] RJS error ("Can't find variable: point") not providing sufficient  information.</title><content type='html'>Hi All,&lt;p&gt;I&amp;#39;m having an issue with rails involving javascript.  Basically, I&lt;br&gt;have the following code:&lt;p&gt;&lt;br&gt;    &amp;lt;ul id=&amp;quot;all-points&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;%for point in Point.find(:all)%&amp;gt;&lt;br&gt;    	&amp;lt;%domid = &amp;quot;point[all][#{&lt;a href="http://point.id"&gt;point.id&lt;/a&gt;}]&amp;quot;%&amp;gt;&lt;br&gt;    	&amp;lt;li class=&amp;quot;available-point&amp;quot; id=&amp;#39;&amp;lt;%=domid%&amp;gt;&amp;#39;&amp;gt;&lt;br&gt;    		&amp;lt;span&amp;gt;&lt;br&gt;    			&amp;lt;%= link_to_remote &amp;quot;ADD&amp;quot;,:url =&amp;gt; {:action =&amp;gt; &amp;quot;add_point&amp;quot;},&lt;br&gt;    				:html =&amp;gt; {:style =&amp;gt; &amp;quot;background: wheat; color: gray; text-&lt;br&gt;decoration: none; border: 1px solid gray;&amp;quot;},&lt;br&gt;    				:with =&amp;gt; &amp;quot;&amp;#39;point=&amp;#39; + #{domid}&amp;quot;&lt;br&gt;    			%&amp;gt;&lt;br&gt;    		&amp;lt;/span&amp;gt;&lt;br&gt;    		(&amp;lt;%=point.source%&amp;gt;) &amp;amp;nbsp &amp;lt;%=&lt;a href="http://point.name"&gt;point.name&lt;/a&gt;%&amp;gt;&lt;br&gt;    	&amp;lt;/li&amp;gt;&lt;br&gt;    	&amp;lt;%= draggable_element(domid, :ghosting =&amp;gt; true, :revert =&amp;gt;&lt;br&gt;true, :scroll =&amp;gt; &amp;quot;window&amp;quot;)%&amp;gt;&lt;br&gt;    &amp;lt;%end%&amp;gt;&lt;br&gt;    &amp;lt;/ul&amp;gt;&lt;p&gt;&lt;p&gt;However, I keep receiving RJS errors telling me &amp;quot;Can&amp;#39;t find variable:&lt;br&gt;point&amp;quot;.  The error has something to do with DOMID as when I change the&lt;br&gt;word &amp;quot;point&amp;quot; to &amp;quot;alksdjflksdjfls&amp;quot; (a.k.a. garbage), it warns me about&lt;br&gt;the garbage name.  I&amp;#39;m admittedly rusty when it comes to Javascript,&lt;br&gt;but this error doesn&amp;#39;t seem to give enough info.  Can someone please&lt;br&gt;tell me what is wrong with my code?&lt;p&gt;&lt;br&gt;FYI, the error comes in my controller when I say:&lt;p&gt;&lt;br&gt;    def add_point&lt;br&gt;     render :update do |page|&lt;br&gt;       page.insert_html :bottom, &amp;quot;selected-points&amp;quot;, &amp;quot;&amp;lt;li&amp;gt;test phrase&amp;lt;/&lt;br&gt;li&amp;gt;&amp;quot;&lt;br&gt;       page.remove params[:point]  #error occurs here&lt;br&gt;     end&lt;br&gt;    end&lt;p&gt;&lt;br&gt;I&amp;#39;ve tried encodeURIComponent as well, but nothing seems to matter.&lt;br&gt;Also, I&amp;#39;m using both Safari and Firefox to debug.  Thoughts?&lt;p&gt;Best.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1736166540600330197?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1736166540600330197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1736166540600330197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1736166540600330197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1736166540600330197'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-rjs-error-cant-find-variable.html' title='[Rails] RJS error (&quot;Can&apos;t find variable: point&quot;) not providing sufficient  information.'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6213039612664093611</id><published>2009-07-04T19:44:00.001-07:00</published><updated>2009-07-04T19:44:30.794-07:00</updated><title type='text'>[Rails] Re: JavaScript validation</title><content type='html'> ya sure...&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 9:02 PM, Rob Cash &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"&gt; &lt;div class="im"&gt;&lt;br&gt; Lakshmi Narayana wrote:&lt;br&gt; &amp;gt; hi,&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; i also faced the similar problem.. long time back.. and i ahave used&lt;br&gt; &amp;gt; jQuery&lt;br&gt; &amp;gt; plugin for that.. so i thought i can help you..&lt;br&gt; &amp;gt; check out this url&lt;br&gt; &amp;gt; &lt;a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" target="_blank"&gt;http://bassistance.de/jquery-plugins/jquery-plugin-validation/&lt;/a&gt;..&lt;br&gt; &amp;gt; this should do.... any quieries i am available online....&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Fri, Jul 3, 2009 at 9:17 PM, Rob Cash&lt;br&gt; &lt;br&gt; &lt;/div&gt;Thanks to all for the replies! ... Lakshmi, I&amp;#39;ll give this a try and may&lt;br&gt; be back with you for questions.&lt;br&gt; &lt;font color="#888888"&gt;--&lt;br&gt; &lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="h5"&gt;Posted via &lt;a href="http://www.ruby-forum.com/" target="_blank"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6213039612664093611?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6213039612664093611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6213039612664093611' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6213039612664093611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6213039612664093611'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-javascript-validation_04.html' title='[Rails] Re: JavaScript validation'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7238907503569692735</id><published>2009-07-04T19:12:00.000-07:00</published><updated>2009-07-04T19:13:14.995-07:00</updated><title type='text'>[Rails] php =&gt; rails (JSON)</title><content type='html'>I have an application that creates a snippet of php in a server, for&lt;br&gt;packaging up data for JSON, using the php package &amp;quot;Pear.&amp;quot; The snippet&lt;br&gt;I create (with varying data, of course, as the application runs) is&lt;br&gt;written in php, but I really want to keep things rails-centric. Is&lt;br&gt;there a way to convert this to NOT use php, so that I am entirely Ruby&lt;br&gt;on Rails? Thanks, Janna B&lt;p&gt;&amp;lt;?php&lt;br&gt;ini_set(&amp;#39;include_path&amp;#39;,ini_get(&amp;#39;include_path&amp;#39;).&amp;quot;;C:\Program Files&lt;br&gt;\Apache Group\Apache2\htdocs&amp;quot;.&amp;quot;\pear&amp;quot;);&lt;br&gt;require(&amp;#39;JSON.php&amp;#39;);&lt;p&gt;$records=array();&lt;br&gt;$records[]=array(&amp;#39;order&amp;#39;=&amp;gt;1, &amp;#39;username&amp;#39;=&amp;gt;&amp;#39;joeyt&amp;#39;);&lt;br&gt;$json=new Services_JSON();&lt;br&gt;echo($json-&amp;gt;encode($records));&lt;br&gt;?&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7238907503569692735?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7238907503569692735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7238907503569692735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7238907503569692735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7238907503569692735'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-php-rails-json.html' title='[Rails] php =&gt; rails (JSON)'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-9180835149293295569</id><published>2009-07-04T17:52:00.001-07:00</published><updated>2009-07-04T17:52:41.095-07:00</updated><title type='text'>[Rails] Re: prevent orphan records</title><content type='html'>Hi Colin,&lt;p&gt;After reading the API, I think that&lt;p&gt;     validates_presence_of   :user_id&lt;p&gt;will not even check to make sure that the user exists in the user&lt;br&gt;table.  It only makes sure that the field value is not blank:&lt;br&gt;&lt;a href="http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/validates_presence_of"&gt;http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/validates_presence_of&lt;/a&gt;.&lt;p&gt;So this validation does not do the work of a proper foreign key&lt;br&gt;constraint.  Am I reading the API incorrectly?&lt;p&gt;Thanks.&lt;p&gt;On Jul 4, 2:14&amp;#160;am, Colin Law &amp;lt;&lt;a href="mailto:clan...@googlemail.com"&gt;clan...@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; 2009/7/4 Learn by Doing &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; If I have&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; belongs_to &amp;#160;:user&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Do I need to have&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; validates_presence_of &amp;#160; :user_id&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; ?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Does Rails validate the presence of :user_id automatically if I have&lt;br&gt;&amp;gt; &amp;gt; belongs_to :user?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; In other words, does Rails prevent against creating orphan records that&lt;br&gt;&amp;gt; &amp;gt; belong to non-existent users?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I believe rails will not stop you creating a record with an empty&lt;br&gt;&amp;gt; user_id. &amp;#160;To be pedantic this is &amp;#39;does not belong to any user&amp;#39; rather&lt;br&gt;&amp;gt; than &amp;#39;belongs to a non-existent user&amp;#39; (for a non-existent user the&lt;br&gt;&amp;gt; user_id would contain a non-nil value for which there is no user). &amp;#160;In&lt;br&gt;&amp;gt; some applications this is a valid requirement. &amp;#160;If you wish to prevent&lt;br&gt;&amp;gt; this then include validates_presence_of as you have indicated.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Colin&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-9180835149293295569?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/9180835149293295569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=9180835149293295569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/9180835149293295569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/9180835149293295569'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-prevent-orphan-records_1237.html' title='[Rails] Re: prevent orphan records'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-704792024145293975</id><published>2009-07-04T16:55:00.001-07:00</published><updated>2009-07-04T16:55:37.396-07:00</updated><title type='text'>[Rails] add a new locale using raul's translate_routes plug-in</title><content type='html'>I just started using Raul Murciano&amp;#39;s translate_routes plug-in. It&amp;#39;s&lt;br&gt;great. Now what I can&amp;#39;t understand is how to add a new locale (in my&lt;br&gt;case, French). I figured that I could just add a new section to my&lt;br&gt;translation file (text.yml). I appended the following to the text.yml&lt;br&gt;file:&lt;p&gt;fr:&lt;br&gt;  back: retourner&lt;p&gt;Then in my application layout (which I copied from Raul&amp;#39;s demo&lt;br&gt;application), I changed the code from:&lt;p&gt;&amp;lt;%= I18n.locale == &amp;#39;es&amp;#39; ? link_to(&amp;#39;en&amp;#39;, :locale =&amp;gt; &amp;#39;en&amp;#39;) : link_to&lt;br&gt;(&amp;#39;es&amp;#39;, :locale =&amp;gt; &amp;#39;es&amp;#39;) %&amp;gt;&lt;p&gt;to:&lt;p&gt;&amp;lt;%= I18n.locale == &amp;#39;fr&amp;#39; ? link_to(&amp;#39;en&amp;#39;, :locale =&amp;gt; &amp;#39;en&amp;#39;) : link_to&lt;br&gt;(&amp;#39;fr&amp;#39;, :locale =&amp;gt; &amp;#39;fr&amp;#39;) %&amp;gt;&lt;p&gt;When I run my application, I get this error:&lt;p&gt;No route matches {:action=&amp;gt;&amp;quot;index&amp;quot;, :locale=&amp;gt;&amp;quot;fr&amp;quot;}&lt;p&gt;So, I&amp;#39;m guess I&amp;#39;ve got to make a change somewhere else for the&lt;br&gt;application to recognize this new route. What am I missing?&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-704792024145293975?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/704792024145293975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=704792024145293975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/704792024145293975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/704792024145293975'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-add-new-locale-using-rauls.html' title='[Rails] add a new locale using raul&apos;s translate_routes plug-in'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1173704013182689263</id><published>2009-07-04T15:35:00.000-07:00</published><updated>2009-07-04T15:36:18.939-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>Hi Conrad,&lt;p&gt;I am using Rails 2.3.2 and Ruby 1.8.7, the latest stable combination &lt;br&gt;recommended by &lt;a href="http://rubyonrails.org"&gt;rubyonrails.org&lt;/a&gt;.&lt;p&gt;I am continuing to troubleshoot this.  I have deleted all the sample &lt;br&gt;data that I preloaded so that my database is empty.  Now, the opposite &lt;br&gt;is happening, it is letting me create records in violation of the &lt;br&gt;uniqueness validation:&lt;p&gt;&amp;gt;&amp;gt; stat0 = Stat.new(:user_id =&amp;gt; 1000, :aspect =&amp;gt; &amp;quot;aspect0&amp;quot;)&lt;br&gt;=&amp;gt; #&amp;lt;Stat id: nil, user_id: 1000, aspect: &amp;quot;aspect0&amp;quot;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; stat0.save!&lt;br&gt;=&amp;gt; true&lt;br&gt;&amp;gt;&amp;gt; stat0 = Stat.new(:user_id =&amp;gt; 1000, :aspect =&amp;gt; &amp;quot;aspect0&amp;quot;)&lt;br&gt;=&amp;gt; #&amp;lt;Stat id: nil, user_id: 1000, aspect: &amp;quot;aspect0&amp;quot;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; stat0.save!&lt;br&gt;=&amp;gt; true&lt;p&gt;I check the database and yes it contains both of the above identical &lt;br&gt;records.  Only their :Stat_ids are different.  Something wrong with my &lt;br&gt;uniqueness validation?&lt;p&gt;   validates_uniqueness_of :aspect, :scope =&amp;gt; :user_id&lt;p&gt;Thanks.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1173704013182689263?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1173704013182689263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1173704013182689263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1173704013182689263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1173704013182689263'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after_3796.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3745444111498576502</id><published>2009-07-04T15:29:00.001-07:00</published><updated>2009-07-04T15:29:33.625-07:00</updated><title type='text'>[Rails] CMS action &amp; "/cms" subfolder for each controller</title><content type='html'>How do I do this? (And is this a good solution?)&lt;p&gt;I want to have a &amp;quot;/cms&amp;quot; for each controller so I can login as admin&lt;br&gt;and edit them, instead of creating whole new controllers for the cms.&lt;p&gt;Default if you add a new action like, def cms... you have to do /&lt;br&gt;controller/1/cms.&lt;p&gt;I&amp;#39;m thinking of creating the backend that all links up each controller&lt;br&gt;through the &amp;quot;/cms&amp;quot;&lt;p&gt;How can I route this? and is this a good idea?&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3745444111498576502?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3745444111498576502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3745444111498576502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3745444111498576502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3745444111498576502'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-cms-action-cms-subfolder-for-each.html' title='[Rails] CMS action &amp; &quot;/cms&quot; subfolder for each controller'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2826471404412200134</id><published>2009-07-04T15:18:00.001-07:00</published><updated>2009-07-04T15:18:17.219-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>&lt;div class="gmail_quote"&gt;On Sat, Jul 4, 2009 at 2:57 AM, Learn by Doing &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;br&gt; I have this in a model&lt;br&gt; &lt;br&gt;      validates_uniqueness_of :aspect, :scope =&amp;gt; :user_id&lt;br&gt; &lt;br&gt; In an instance method of the same model I have &amp;quot;save!&amp;quot; but I don&amp;#39;t touch&lt;br&gt; the :aspect attribute in that instance method at all.&lt;br&gt; &lt;br&gt; Whenever that save! command is run however I get this error:&lt;br&gt; &lt;br&gt;       ActiveRecord::RecordInvalid: Validation failed:  Aspect has&lt;br&gt; already been taken&lt;br&gt; &lt;br&gt; I don&amp;#39;t understand.  The validation should not skip the instance from&lt;br&gt; which the method is called.  Please help.  Thanks.&lt;br&gt; --&lt;br&gt; Posted via &lt;a href="http://www.ruby-forum.com/" target="_blank"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt; &lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What version of Rails are you using?  Did you try this in Edge Rails?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Conrad&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;br&gt; &lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2826471404412200134?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2826471404412200134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2826471404412200134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2826471404412200134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2826471404412200134'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after_5062.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5663390353984570064</id><published>2009-07-04T15:14:00.001-07:00</published><updated>2009-07-04T15:14:36.729-07:00</updated><title type='text'>[Rails] Re: routing URL REST or not REST</title><content type='html'>You may also want to look at the :shallow option to map.resources - it&lt;br&gt;does pretty much what you&amp;#39;re looking for.&lt;p&gt;--Matt Jones&lt;p&gt;On Jul 3, 6:13&amp;#160;pm, Erwin &amp;lt;&lt;a href="mailto:yves_duf...@mac.com"&gt;yves_duf...@mac.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; my question is maybe silly.... &amp;#160;but it&amp;#39;s already July 4th .. and I am&lt;br&gt;&amp;gt; tired..&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; until now I have been using in my tests the following routes&lt;br&gt;&amp;gt; (simplified version)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; map.resources :academies do |academies|&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; academies.resources :ecourses&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160;academies.resources :instructors&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; academies.resources :trainees&lt;br&gt;&amp;gt; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; so I get the URL type : &amp;#160; &amp;#160;/academies/1/libraries from&lt;br&gt;&amp;gt; academy_libraries_path(current_user.academy)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; the current_user being defined , and he is always logged into one&lt;br&gt;&amp;gt; academy when working &amp;#160;( current_user.academy)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I wonder is it possible to &amp;#160;replace academy_id in the URL with a&lt;br&gt;&amp;gt; string &amp;#39;CURRENT&amp;#39; &amp;#160;? and have :&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; /academies/CURRENT/libraries (then nobody could hack the academy)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; or is it better to keep the REST URL type and perform a security check&lt;br&gt;&amp;gt; (permit ) in the controller &amp;#160;??&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; thanks&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5663390353984570064?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5663390353984570064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5663390353984570064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5663390353984570064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5663390353984570064'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-routing-url-rest-or-not-rest.html' title='[Rails] Re: routing URL REST or not REST'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5980850537409325911</id><published>2009-07-04T15:05:00.000-07:00</published><updated>2009-07-04T15:06:09.670-07:00</updated><title type='text'>[Rails] Re: Msdd update</title><content type='html'>&lt;div&gt;On Sat, Jul 4, 2009 at 2:35 PM, JannaB &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:mistressjanna@hotmail.com"&gt;mistressjanna@hotmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;/div&gt;&lt;div class="gmail_quote"&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt; &lt;br&gt; I must be missing something. I have a list of values returned (id&amp;#39;s to&lt;br&gt; my &amp;#39;associates&amp;#39;  table) and I want to update all of those in the list.&lt;br&gt; Presently, I iterate through the list, updating each one (see below).&lt;br&gt; &lt;br&gt; Isn;t there a way I can do this all in one fell swoopy in RoR, without&lt;br&gt; having to iterate through the list? -Janna B.&lt;br&gt; &lt;br&gt; params[:form__list1].each do |id|&lt;br&gt;           associate = Associate.find(id)&lt;br&gt;           associate.update_attributes({:channel_id =&amp;gt;&lt;br&gt; @&lt;a href="http://channel.id" target="_blank"&gt;channel.id&lt;/a&gt;, :joined_channel_datetime =&amp;gt; DateTime.now})&lt;br&gt; end&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;option 1:  try using update_all&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Note:  Please see API documentation for further explaination.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;option 2:  rework the original code to eliminate the find call within the block and iterate over the Association instances&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;associates = Associate.find( params[:form__list1] )&lt;/div&gt;&lt;div&gt;associates.each do | associate |&lt;/div&gt;&lt;div&gt;    associate.update_attributes( {:channel_id =&amp;gt; @&lt;a href="http://channel.id" target="_blank"&gt;channel.id&lt;/a&gt;, :joined_channel_datetime =&amp;gt; DateTime.now } )  &lt;/div&gt; &lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Good luck,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-Conrad&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt;&lt;br&gt; &lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5980850537409325911?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5980850537409325911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5980850537409325911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5980850537409325911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5980850537409325911'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-msdd-update.html' title='[Rails] Re: Msdd update'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-2286044102455864312</id><published>2009-07-04T14:58:00.000-07:00</published><updated>2009-07-04T15:08:58.939-07:00</updated><title type='text'>[Rails] Re: Ajax request and redirection</title><content type='html'>Quick edit:&lt;p&gt;On the client side, Firefox does not show any error.&lt;p&gt;I meant to say:&lt;p&gt;On the client side, Firebug in Firefox does not show any error.&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-2286044102455864312?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/2286044102455864312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=2286044102455864312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2286044102455864312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/2286044102455864312'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-ajax-request-and-redirection.html' title='[Rails] Re: Ajax request and redirection'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4719473038688918075</id><published>2009-07-04T14:55:00.001-07:00</published><updated>2009-07-04T14:55:39.091-07:00</updated><title type='text'>[Rails] Ajax request and redirection</title><content type='html'>This is most likely my lack of understanding of Ajax concepts, but I&lt;br&gt;cannot find an answer on the web for the following question:&lt;p&gt;&amp;quot;Should an ajax request triggered by a specific page must come back to&lt;br&gt;the same page?&amp;quot;&lt;p&gt;Here is my jQuery handler in the jsTree that communicates with my server&lt;br&gt;side Rails code:&lt;p&gt;Note that the base_url is defined at the top of this file as shown&lt;br&gt;below:&lt;p&gt;var base_url = &amp;quot;/folders/&amp;quot;;&lt;br&gt;...&lt;br&gt;var handle_selected = function(docs_count_in_json)   {&lt;br&gt;    hide_progress();&lt;br&gt;    //alert(docs_count_in_json.documents_count);&lt;br&gt;    var c = docs_count_in_json.documents_count;&lt;br&gt;    if (c &amp;gt; 0)  {&lt;br&gt;        // alert(&amp;quot;Has documents to display.&amp;quot;)&lt;br&gt;        // should directly go to the documents tab if there are&lt;br&gt;documents&lt;br&gt;        var s_id =&lt;br&gt;jQuery.tree_reference(&amp;#39;folders_tree&amp;#39;).selected.attr(&amp;#39;id&amp;#39;);&lt;br&gt;        jQuery.ajax({&lt;br&gt;            type: &amp;quot;POST&amp;quot;,&lt;br&gt;            url: base_url + &amp;#39;set_current_folder/&amp;#39; + s_id,&lt;br&gt;            beforeSend: show_progress,&lt;br&gt;            data: ({authenticity_token: AUTH_TOKEN}),&lt;br&gt;            dataType: &amp;quot;json&amp;quot;,&lt;br&gt;            error: handle_ajax_error,&lt;br&gt;            success: hide_progress&lt;br&gt;        });&lt;br&gt;        window.location = &amp;#39;/documents/&amp;#39;&lt;br&gt;        return false;&lt;br&gt;    } else {&lt;br&gt;        alert(&amp;quot;This folder does not have any documents.&amp;quot;)&lt;br&gt;    }&lt;br&gt;}&lt;p&gt;So I am POSTing to the url&lt;br&gt;&lt;a href="http://localhost:3000/folders/set_current_folder/1"&gt;http://localhost:3000/folders/set_current_folder/1&lt;/a&gt;&lt;p&gt;Which invokes the set_current_folder method with a params[:id] value for&lt;br&gt;my currently selected folder.  The set_current_folder method is as&lt;br&gt;follows:&lt;p&gt;  def set_current_folder&lt;br&gt;    @folder = Folder.find(params[:id])&lt;br&gt;    session[:nested_folder_id] = nil&lt;br&gt;    unless @folder.practice_id.blank?&lt;br&gt;      session[:folder_id] = @&lt;a href="http://folder.id"&gt;folder.id&lt;/a&gt;&lt;br&gt;      flash[:notice] = &amp;quot;Current folder set to #{&lt;a href="http://current_folder.name"&gt;current_folder.name&lt;/a&gt;}&amp;quot;&lt;br&gt;      redirect_to documents_path&lt;br&gt;    else             # this should not happen, yet just in case&lt;br&gt;      flash[:warning] = &amp;quot;Please associate this folder with corresponding&lt;br&gt;practice first.&amp;quot;&lt;br&gt;      redirect_to(:action =&amp;gt; &amp;#39;edit&amp;#39;, :id =&amp;gt; session[:folder_id])&lt;br&gt;    end&lt;br&gt;  end&lt;p&gt;As can be seen above, set_current_folder method sets the value of&lt;br&gt;currently selected folder in the session in the line of code&lt;p&gt;      session[:folder_id] = @&lt;a href="http://folder.id"&gt;folder.id&lt;/a&gt;&lt;p&gt;And the redirects to the documents_controller&amp;#39;s default index action&lt;br&gt;which shows the documents for that folder.  I have run the program&lt;br&gt;through debugger and it actually hits that line of code and populates&lt;br&gt;the :folder_id variable in the session hash.&lt;p&gt;But after redirect, it disappears and cannot be seen by the&lt;br&gt;documents_controller.  Finally, I get a &amp;quot;server error&amp;quot; on the page where&lt;br&gt;I trigger this request instead of ending up on the index.html.erb page&lt;br&gt;for the documents_controller.  The server side log shows no errors.  On&lt;br&gt;the client side, Firefox does not show any error.&lt;p&gt;Please help me understand what is going on here?&lt;p&gt;Thanks.&lt;p&gt;Bharat&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4719473038688918075?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4719473038688918075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4719473038688918075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4719473038688918075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4719473038688918075'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-ajax-request-and-redirection.html' title='[Rails] Ajax request and redirection'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5180010506793520097</id><published>2009-07-04T14:52:00.001-07:00</published><updated>2009-07-04T14:52:52.264-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>Hi Colin,&lt;p&gt;Thanks for asking that question.  I had preloaded the database so I &lt;br&gt;didn&amp;#39;t have to create a new record.  So now I just tried doing that and &lt;br&gt;it wouldn&amp;#39;t let me create a new record although the :aspect value I used &lt;br&gt;does not exist at all in the database.  Console output is below:&lt;p&gt;&amp;gt;&amp;gt; stat0 = Stat.new(:user =&amp;gt; user0, :aspect =&amp;gt; &amp;quot;aspect0&amp;quot;)&lt;br&gt;=&amp;gt; #&amp;lt;Stat id: nil, user_id: 1000, aspect: &amp;quot;aspect0&amp;quot;, . . .&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; stat0.save!&lt;br&gt;ActiveRecord::RecordInvalid: Validation failed: Aspect has already been &lt;br&gt;taken&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:1021:in &lt;br&gt;`save_without_dirty!&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/dirty.rb:87:in &lt;br&gt;`save_without_transactions!&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in &lt;br&gt;`save!&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in &lt;br&gt;`transaction&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:182:in &lt;br&gt;`transaction&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in &lt;br&gt;`save!&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:208:in &lt;br&gt;`rollback_active_record_state!&amp;#39;&lt;br&gt;  from &lt;br&gt;/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/transactions.rb:200:in &lt;br&gt;`save!&amp;#39;&lt;br&gt;  from (irb):70&lt;p&gt;&amp;quot;aspect0&amp;quot; is something I completely made up and does not exist in the &lt;br&gt;database.  :user_id 1000 does exist in different rows with different &lt;br&gt;values of :aspect however.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5180010506793520097?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5180010506793520097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5180010506793520097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5180010506793520097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5180010506793520097'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after_4542.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7120231612248938164</id><published>2009-07-04T14:35:00.000-07:00</published><updated>2009-07-04T14:36:06.450-07:00</updated><title type='text'>[Rails] Msdd update</title><content type='html'>I must be missing something. I have a list of values returned (id&amp;#39;s to&lt;br&gt;my &amp;#39;associates&amp;#39;  table) and I want to update all of those in the list.&lt;br&gt;Presently, I iterate through the list, updating each one (see below).&lt;p&gt;Isn;t there a way I can do this all in one fell swoopy in RoR, without&lt;br&gt;having to iterate through the list? -Janna B.&lt;p&gt;params[:form__list1].each do |id|&lt;br&gt;          associate = Associate.find(id)&lt;br&gt;          associate.update_attributes({:channel_id =&amp;gt;&lt;br&gt;@&lt;a href="http://channel.id"&gt;channel.id&lt;/a&gt;, :joined_channel_datetime =&amp;gt; DateTime.now})&lt;br&gt;end&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7120231612248938164?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7120231612248938164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7120231612248938164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7120231612248938164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7120231612248938164'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-msdd-update.html' title='[Rails] Msdd update'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5704833194162109561</id><published>2009-07-04T14:23:00.001-07:00</published><updated>2009-07-04T14:23:59.824-07:00</updated><title type='text'>[Rails] Re: find Composite Primary Keys</title><content type='html'>Jeffrey,&lt;p&gt;Thank you for the enlightenment!&lt;p&gt;Happy Independence Day!&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5704833194162109561?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5704833194162109561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5704833194162109561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5704833194162109561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5704833194162109561'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-find-composite-primary-keys.html' title='[Rails] Re: find Composite Primary Keys'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-724123746043865047</id><published>2009-07-04T14:18:00.000-07:00</published><updated>2009-07-04T14:19:14.026-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>2009/7/4 Learn by Doing &amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt;:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Hi Nicholas,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks for your response. &amp;#160;What I meant was that validation should not&lt;br&gt;&amp;gt; compare the object that is being updated against its own existing copy.&lt;br&gt;&amp;gt; For example, I am editting an existing object:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; [:aspect =&amp;gt; &amp;quot;Aspect-A&amp;quot;, :user_id =&amp;gt; 5, :third_field =&amp;gt; &amp;quot;morning&amp;quot;].&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Now, the object is unique in the database according to&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; validates_uniqueness_of :aspect, :scope =&amp;gt; :user_id&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; That&amp;#39;s all good. &amp;#160;However, when I update the object with the following&lt;br&gt;&amp;gt; statements:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; self.third_field = &amp;quot;night&amp;quot;&lt;br&gt;&amp;gt; &amp;#160; save!&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Rails returns an error:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; ActiveRecord::RecordInvalid: Validation failed: &amp;#160;Aspect has&lt;br&gt;&amp;gt; already been taken&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Why? &amp;#160;I am just trying to update an existing object, not create a new&lt;br&gt;&amp;gt; one that would violate the uniqueness validation.&lt;p&gt;What code are you using for creating and modifying the object before saving it?&lt;p&gt;Colin&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-724123746043865047?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/724123746043865047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=724123746043865047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/724123746043865047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/724123746043865047'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after_3519.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4309344130468172598</id><published>2009-07-04T14:14:00.001-07:00</published><updated>2009-07-04T14:14:36.331-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>Hi Nicholas,&lt;p&gt;Thanks for your response.  What I meant was that validation should not &lt;br&gt;compare the object that is being updated against its own existing copy. &lt;br&gt;For example, I am editting an existing object:&lt;p&gt;   [:aspect =&amp;gt; &amp;quot;Aspect-A&amp;quot;, :user_id =&amp;gt; 5, :third_field =&amp;gt; &amp;quot;morning&amp;quot;].&lt;p&gt;Now, the object is unique in the database according to&lt;p&gt;   validates_uniqueness_of :aspect, :scope =&amp;gt; :user_id&lt;p&gt;That&amp;#39;s all good.  However, when I update the object with the following &lt;br&gt;statements:&lt;p&gt;   self.third_field = &amp;quot;night&amp;quot;&lt;br&gt;   save!&lt;p&gt;Rails returns an error:&lt;p&gt;   ActiveRecord::RecordInvalid: Validation failed:  Aspect has&lt;br&gt;already been taken&lt;p&gt;Why?  I am just trying to update an existing object, not create a new &lt;br&gt;one that would violate the uniqueness validation.&lt;p&gt;Thanks.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4309344130468172598?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4309344130468172598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4309344130468172598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4309344130468172598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4309344130468172598'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after_04.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8099257795776970269</id><published>2009-07-04T14:04:00.001-07:00</published><updated>2009-07-04T14:04:54.590-07:00</updated><title type='text'>[Rails] Re: prevent orphan records</title><content type='html'>Thanks Marnen and Colin for your excellent suggestions.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8099257795776970269?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8099257795776970269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8099257795776970269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8099257795776970269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8099257795776970269'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-prevent-orphan-records_04.html' title='[Rails] Re: prevent orphan records'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-92903509784878981</id><published>2009-07-04T13:31:00.000-07:00</published><updated>2009-07-04T13:32:02.573-07:00</updated><title type='text'>[Rails] Using Mutex'es in a Rails app (WAS: How to Synchronize?)</title><content type='html'>Hi,&lt;p&gt;I don&amp;#39;t really know whether it&amp;#39;s appropriate to re-post a message. But I&lt;br&gt;think I asked my question in a proper way, and would like to re-post to&lt;br&gt;eliminate the chance of missing the right people for this question.&lt;p&gt;Here is the original message:&lt;p&gt;&lt;br&gt;-----&lt;br&gt;Onur Gungor wrote:&lt;p&gt;Hi,&lt;p&gt;I am developing a web based game in which people try to guess the&lt;br&gt;concealed word in a collaborative manner.&lt;p&gt;As you already take for granted, I use ruby on rails on the server side.&lt;p&gt;But I have a problem, I synchronize the method which arranges games and&lt;br&gt;informs the users using a Mutex. Though I didn&amp;#39;t tested heavily, it&lt;br&gt;seemed to work on the development server. But when I deployed the&lt;br&gt;project onto the production server, it seems that it&amp;#39;s not functioning&lt;br&gt;(or there may be some other problem)&lt;p&gt;On the development, I use a mongrel server, which I start on the command&lt;br&gt;line (script/server -b bla bla -p 3000)&lt;p&gt;On the production server,  I use Passenger with the default settings.&lt;p&gt;First I suspected that this problem is originating because Passenger was&lt;br&gt;spawning processes and they are not sharing the mutex. But I checked the&lt;br&gt;documentation but couldn&amp;#39;t find a mention of it. And in this link&lt;br&gt;(&lt;a href="http://m.onkey.org/2008/10/23/thread-safety-for-your-rails"&gt;http://m.onkey.org/2008/10/23/thread-safety-for-your-rails&lt;/a&gt;) it says&lt;br&gt;that it&amp;#39;s OK to use Mutexes (though not mentioning the multiprocess&lt;br&gt;passenger).&lt;p&gt;What do you think the problem is about? I am posting a code snippet&lt;br&gt;which exemplifies my usage of Mutexes.&lt;p&gt;Here is the relevant versions:&lt;p&gt;Production:&lt;p&gt;Passenger: 2.2.2&lt;br&gt;Apache: 2.2.8-1ubuntu0.9&lt;p&gt;About your application&amp;#39;s environment&lt;br&gt;Ruby version              1.8.6 (x86_64-linux)&lt;br&gt;RubyGems version          1.3.1&lt;br&gt;Rack version              1.0 bundled&lt;br&gt;Rails version             2.3.2&lt;br&gt;Active Record version     2.3.2&lt;br&gt;Action Pack version       2.3.2&lt;br&gt;Active Resource version   2.3.2&lt;br&gt;Action Mailer version     2.3.2&lt;br&gt;Active Support version    2.3.2&lt;br&gt;Edge Rails revision       unknown&lt;br&gt;Application root          XXXX&lt;br&gt;Environment               development&lt;br&gt;Database adapter          mysql&lt;p&gt;Development:&lt;p&gt;About your application&amp;#39;s environment&lt;br&gt;Ruby version              1.8.7 (i486-linux)&lt;br&gt;RubyGems version          1.3.1&lt;br&gt;Rack version              1.0 bundled&lt;br&gt;Rails version             2.3.2&lt;br&gt;Active Record version     2.3.2&lt;br&gt;Action Pack version       2.3.2&lt;br&gt;Active Resource version   2.3.2&lt;br&gt;Action Mailer version     2.3.2&lt;br&gt;Active Support version    2.3.2&lt;br&gt;Edge Rails revision       unknown&lt;br&gt;Application root          XXXX&lt;br&gt;Environment               development&lt;br&gt;Database adapter          mysql&lt;br&gt;Database schema version   20090701025248&lt;p&gt;Here is the code:&lt;p&gt;def GameControl&lt;p&gt;@@semaphore = Mutex.new&lt;p&gt;def GameControl.start_game(user, singlegame = false)&lt;p&gt;  @@semaphore.synchronize {&lt;p&gt;    do the stuff here which I want to be processed by only one at a&lt;br&gt;time.&lt;p&gt;  }&lt;p&gt;  end&lt;p&gt;end&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-92903509784878981?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/92903509784878981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=92903509784878981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/92903509784878981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/92903509784878981'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-using-mutexes-in-rails-app-was.html' title='[Rails] Using Mutex&apos;es in a Rails app (WAS: How to Synchronize?)'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6138240248144073214</id><published>2009-07-04T11:19:00.000-07:00</published><updated>2009-07-04T12:16:51.023-07:00</updated><title type='text'>[Rails] Re: Beginner needs help</title><content type='html'>Tried the suggestions from Sijo. Worked like a charm. Coool..!&lt;p&gt;Thanks again everyone!&lt;p&gt;//Peter&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6138240248144073214?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6138240248144073214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6138240248144073214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6138240248144073214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6138240248144073214'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-beginner-needs-help_6972.html' title='[Rails] Re: Beginner needs help'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3785019675070909154</id><published>2009-07-04T11:12:00.000-07:00</published><updated>2009-07-04T12:01:57.476-07:00</updated><title type='text'>[Rails] Re: Beginner needs help</title><content type='html'>Thanks guys,&lt;br&gt;I have been out of town a few days, thats why this late reply.&lt;p&gt;I am using Rails 2.3.2 The book was published in 2006 so I guess the &lt;br&gt;examples can be out of date. I ran into that when the book mentioned &lt;br&gt;start-form-tag and end-form-tag... Took me a while to figure that out.&lt;p&gt;Anyways, I am buildng all the examples from scratch, and so far I have &lt;br&gt;not downloaded anything, so it could be a typo, even though I have &lt;br&gt;checked the code several times...&lt;p&gt;Tha last two suggestions I haven&amp;#39;t tried yet, but I will.&lt;p&gt;cheers,&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3785019675070909154?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3785019675070909154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3785019675070909154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3785019675070909154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3785019675070909154'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-beginner-needs-help_04.html' title='[Rails] Re: Beginner needs help'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4259006742310875987</id><published>2009-07-04T11:03:00.000-07:00</published><updated>2009-07-04T11:43:04.634-07:00</updated><title type='text'>[Rails] Re: :all or noop operator for find_all_by_*?</title><content type='html'>Am 04.07.2009 um 19:11 schrieb Matt Jones:&lt;p&gt;&amp;gt; Assuming that Client has_many Hosts, you could do:&lt;p&gt;Yes, it has.&lt;p&gt;&amp;gt; client_hosts = options[:client] ? Client.find(options&lt;br&gt;&amp;gt; [:client]).hosts : Host&lt;br&gt;&amp;gt; old_hosts = client_hosts.last_seen_before((minutes.minutes.ago)&lt;p&gt;&lt;br&gt;That still leaves me with a ? : construct, which in my eyes should be  &lt;br&gt;useless.&lt;p&gt;Anyway, thanks Marnen and Matt for the suggestions, but I&amp;#39;ve gone with  &lt;br&gt;the scope chaining mentioned in another post a little earlier on the  &lt;br&gt;list. For the record, the result is:&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br&gt;minutes   = options[:minutes] || 10&lt;br&gt;client_id = options[:client] ? Client.find(options[:client]) : nil&lt;p&gt;old_hosts = Host.last_seen_before(minutes.to_i.minutes.ago)&lt;br&gt;old_hosts = old_hosts.find_all_by_client_id(client_id) unless  &lt;br&gt;client_id.nil?&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;&lt;p&gt;For the next options/scopes, I can just continue to do &amp;#39;old_hosts =  &lt;br&gt;old_hosts.other_scope(some_param) unless some_param.nil?&amp;#39; to further  &lt;br&gt;chain the scopes and thus narrow the list of results as needed.&lt;p&gt;Regards,&lt;p&gt;Felix&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4259006742310875987?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4259006742310875987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4259006742310875987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4259006742310875987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4259006742310875987'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-all-or-noop-operator-for_04.html' title='[Rails] Re: :all or noop operator for find_all_by_*?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4244406477231405040</id><published>2009-07-04T10:11:00.000-07:00</published><updated>2009-07-04T10:42:06.535-07:00</updated><title type='text'>[Rails] Re: :all or noop operator for find_all_by_*?</title><content type='html'>Assuming that Client has_many Hosts, you could do:&lt;p&gt;client_hosts = options[:client] ? Client.find(options&lt;br&gt;[:client]).hosts : Host&lt;br&gt;old_hosts = client_hosts.last_seen_before((minutes.minutes.ago)&lt;p&gt;--Matt Jones&lt;p&gt;On Jul 3, 3:38&amp;#160;pm, Felix Sch&amp;#228;fer &amp;lt;&lt;a href="mailto:schae...@cypres-it.com"&gt;schae...@cypres-it.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hello,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;ve been looking for a way to noop a find_all_by. Use case: I have a &amp;#160;&lt;br&gt;&amp;gt; function that takes a hash called options as argument, and that &amp;#160;&lt;br&gt;&amp;gt; operates on a subset of Host objects as such:&lt;br&gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;&lt;br&gt;&amp;gt; client_id = options[:client] ? Client.find(options[:client]) : nil&lt;br&gt;&amp;gt; old_hosts = client_id ? &amp;#160;&lt;br&gt;&amp;gt; Host&lt;br&gt;&amp;gt; .last_seen_before&lt;br&gt;&amp;gt; (minutes.minutes.ago).find_all_by_client_id(client_id) : &amp;#160;&lt;br&gt;&amp;gt; Host.last_seen_before(minutes.minutes.ago)&lt;br&gt;&amp;gt; &amp;quot;&amp;quot;&amp;quot;&lt;br&gt;&amp;gt; last_seen_before is a named_scope. If I had a noop for the &amp;#160;&lt;br&gt;&amp;gt; find_all_by_client_id, I could make due of the client_id ? : part in &amp;#160;&lt;br&gt;&amp;gt; the second line.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I admit that this is quite a simple a case, and that it doesn&amp;#39;t add &amp;#160;&lt;br&gt;&amp;gt; much complexity to the program, but I&amp;#39;ll soon have to add some more &amp;#160;&lt;br&gt;&amp;gt; filters and/or scopes, and I&amp;#39;d hate to make different calls depending &amp;#160;&lt;br&gt;&amp;gt; on whether the option is set or not.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Does anyone know a way to make this less painfull?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Felix&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4244406477231405040?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4244406477231405040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4244406477231405040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4244406477231405040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4244406477231405040'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-all-or-noop-operator-for.html' title='[Rails] Re: :all or noop operator for find_all_by_*?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8623122229726125550</id><published>2009-07-04T10:07:00.000-07:00</published><updated>2009-07-04T10:10:42.234-07:00</updated><title type='text'>[Rails] Re: Not sure how to do this</title><content type='html'>You could try building up a chain of scopes - see this post:&lt;p&gt;&lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91"&gt;http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/a7df6a8b9628bb4b/d6b738f83084ec91?lnk=gst&amp;amp;q=scoped#d6b738f83084ec91&lt;/a&gt;&lt;p&gt;As noted there, you can avoid cluttering up your model by using&lt;br&gt;&amp;#39;scoped&amp;#39; to create anonymous scopes.&lt;p&gt;So your example would look like:&lt;p&gt;# in the controller action&lt;br&gt;proxy = Machine&lt;br&gt;[:attr1, :attr2, :attr3].each do { |k|&lt;br&gt;  proxy = proxy.scoped(:conditions =&amp;gt; Hash[k, params[k]]) unless params&lt;br&gt;[k].blank?&lt;br&gt;}&lt;br&gt;@machines = proxy.find(:all)&lt;p&gt;That last find can also be a paginate, have limits, sorts, etc.&lt;p&gt;--Matt Jones&lt;p&gt;On Jul 2, 5:42&amp;#160;pm, jhaagmans &amp;lt;&lt;a href="mailto:jaap.haagm...@gmail.com"&gt;jaap.haagm...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; In an app I&amp;#39;m working on, I want to have a filter in which you can&lt;br&gt;&amp;gt; specify certain attributes and click &amp;quot;filter&amp;quot; to activate an AJAX&lt;br&gt;&amp;gt; request and return a list of, say, machines that match with those&lt;br&gt;&amp;gt; attributes.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; No I&amp;#39;m not sure how to build the controller.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; If I would specify all the attributes, I would simply do:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; def filter&lt;br&gt;&amp;gt; &amp;#160; @machines = Machine.find(:all, :conditions =&amp;gt; { :attr_1 =&amp;gt; params&lt;br&gt;&amp;gt; [:attr_1], :attr_2 ... }&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; But how would I do this if only some of the attributes are specified&lt;br&gt;&amp;gt; and the others are nil? Would I have to create @machines including all&lt;br&gt;&amp;gt; machines and have Rails do the rest of the work or is there a way to&lt;br&gt;&amp;gt; get find to do what I want?&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8623122229726125550?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8623122229726125550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8623122229726125550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8623122229726125550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8623122229726125550'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-not-sure-how-to-do-this.html' title='[Rails] Re: Not sure how to do this'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1420196244107635612</id><published>2009-07-04T09:56:00.001-07:00</published><updated>2009-07-04T09:56:24.016-07:00</updated><title type='text'>[Rails] Re: Eager loading with find_by_sql</title><content type='html'>I&amp;#39;d recommend that you take a look at the association_preload.rb code&lt;br&gt;as well; I also wonder if the list might be able to help with the&lt;br&gt;find_by_sql query, given that you&amp;#39;re working too hard on the&lt;br&gt;conditions below - :conditions =&amp;gt; { :tweet_id =&amp;gt; tweet_ids } will do&lt;br&gt;the same thing you&amp;#39;re spelling out explicitly.&lt;p&gt;--Matt Jones&lt;p&gt;On Jul 4, 12:59&amp;#160;am, Dallas &amp;lt;&lt;a href="mailto:dallas.devr...@gmail.com"&gt;dallas.devr...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I have a model Tweets, it has_many :teams&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I wrote a custom find_by_sql query for tweets (yes i tried all other&lt;br&gt;&amp;gt; approaches) such that I can&amp;#39;t eager load the teams. &amp;#160;I collect the ids&lt;br&gt;&amp;gt; and try to fake eager loading myself like so...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; team_hash = {}&lt;br&gt;&amp;gt; #collect up the tweet ids&lt;br&gt;&amp;gt; tweet_ids = tweets.collect{|t| &lt;a href="http://t.id"&gt;t.id&lt;/a&gt;}&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; #find the associated teams&lt;br&gt;&amp;gt; TeamTweet.find(:all, :include =&amp;gt; :team, :conditions =&amp;gt; &amp;quot;tweet_id IN (&amp;quot;&lt;br&gt;&amp;gt; + tweet_ids.join(&amp;#39;,&amp;#39;) +&amp;quot;)&amp;quot;).each do |tt|&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;team_hash[tt.tweet_id] = team_hash[tt.tweet_id] ? team_hash&lt;br&gt;&amp;gt; [tt.tweet_id] &amp;lt;&amp;lt; tt.team : [tt.team]&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; #reset the teams attribute&lt;br&gt;&amp;gt; tweets.each do |tweet|&lt;br&gt;&amp;gt; &amp;#160; teams = team_hash[&lt;a href="http://tweet.id"&gt;tweet.id&lt;/a&gt;] ? team_hash[&lt;a href="http://tweet.id"&gt;tweet.id&lt;/a&gt;] : []&lt;br&gt;&amp;gt; &amp;#160; tweet.write_attribute(:teams, teams)&lt;br&gt;&amp;gt; &amp;#160; # also tried tweet.teams = teams&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;m not sure f there is a better way to do this in general but when I&lt;br&gt;&amp;gt; access tweet.teams it still queries the database for the teams on each&lt;br&gt;&amp;gt; tweet even though I set it already. &amp;#160;I assumed this would be a common&lt;br&gt;&amp;gt; problem for people using find_by_sql but can&amp;#39;t find anything. &amp;#160;Any&lt;br&gt;&amp;gt; solutions or suggestions would be greatly appreciated!&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1420196244107635612?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1420196244107635612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1420196244107635612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1420196244107635612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1420196244107635612'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-eager-loading-with-findbysql.html' title='[Rails] Re: Eager loading with find_by_sql'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3715673212797352648</id><published>2009-07-04T08:32:00.001-07:00</published><updated>2009-07-04T08:32:42.673-07:00</updated><title type='text'>[Rails] Re: JavaScript validation</title><content type='html'>Lakshmi Narayana wrote:&lt;br&gt;&amp;gt; hi,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; i also faced the similar problem.. long time back.. and i ahave used &lt;br&gt;&amp;gt; jQuery&lt;br&gt;&amp;gt; plugin for that.. so i thought i can help you..&lt;br&gt;&amp;gt; check out this url&lt;br&gt;&amp;gt; &lt;a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/"&gt;http://bassistance.de/jquery-plugins/jquery-plugin-validation/&lt;/a&gt;..&lt;br&gt;&amp;gt; this should do.... any quieries i am available online....&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; On Fri, Jul 3, 2009 at 9:17 PM, Rob Cash&lt;p&gt;Thanks to all for the replies! ... Lakshmi, I&amp;#39;ll give this a try and may &lt;br&gt;be back with you for questions.&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3715673212797352648?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3715673212797352648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3715673212797352648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3715673212797352648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3715673212797352648'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-javascript-validation.html' title='[Rails] Re: JavaScript validation'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4534999415370764516</id><published>2009-07-04T08:18:00.000-07:00</published><updated>2009-07-04T08:19:18.227-07:00</updated><title type='text'>[Rails] Re: prevent orphan records</title><content type='html'>Colin Law wrote:&lt;br&gt;[...]&lt;br&gt;&amp;gt; I believe rails will not stop you creating a record with an empty&lt;br&gt;&amp;gt; user_id.  To be pedantic this is &amp;#39;does not belong to any user&amp;#39; rather&lt;br&gt;&amp;gt; than &amp;#39;belongs to a non-existent user&amp;#39; (for a non-existent user the&lt;br&gt;&amp;gt; user_id would contain a non-nil value for which there is no user).  &lt;p&gt;Correct.&lt;p&gt;&amp;gt; In&lt;br&gt;&amp;gt; some applications this is a valid requirement.  If you wish to prevent&lt;br&gt;&amp;gt; this then include validates_presence_of as you have indicated.&lt;p&gt;Also make the field not null in the DB and add a foreign key constraint &lt;br&gt;(the foreign_key_migrations and foreign_key_associations plugins make &lt;br&gt;this easy).  Remember, Rails&amp;#39; validations are not a replacement for the &lt;br&gt;DB&amp;#39;s integrity checks.  Don&amp;#39;t rely solely on Rails for this.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Colin&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4534999415370764516?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4534999415370764516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4534999415370764516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4534999415370764516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4534999415370764516'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-prevent-orphan-records.html' title='[Rails] Re: prevent orphan records'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5012662873997753565</id><published>2009-07-04T08:13:00.000-07:00</published><updated>2009-07-04T08:14:11.435-07:00</updated><title type='text'>[Rails] Re: Table Inheritance based on a function</title><content type='html'>On 4 Jul., 00:10, Matt Jones &amp;lt;&lt;a href="mailto:al2o...@gmail.com"&gt;al2o...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Even the view method is going to end up binding the two together,&lt;p&gt;Of course, but it will derive the &amp;#39;type&amp;#39; at the moment of the query,&lt;br&gt;and not a type that was last UPDATEd by the last RoR application (and&lt;br&gt;hopefully anybody else accessing the DB).&lt;p&gt;&amp;gt; Maybe I&amp;#39;m being dense, but it doesn&amp;#39;t seem like any more &amp;quot;code in the&lt;br&gt;&amp;gt; DB&amp;quot; than defining the view.&lt;p&gt;Unfortunately it _is_ a lot more.&lt;br&gt;A database view is per se not updateable - several mechanism are being&lt;br&gt;discussed for a solution - like here for Postgres:&lt;br&gt;&lt;a href="http://wiki.postgresql.org/wiki/Updatable_views"&gt;http://wiki.postgresql.org/wiki/Updatable_views&lt;/a&gt;&lt;p&gt;None of these concepts is simple and without debate.&lt;br&gt;And IMHO updateable view is also violating the &amp;quot;spirit of the&lt;br&gt;inventor&amp;quot; of relational DBs.&lt;p&gt;&amp;gt; Or, as the computer scientists call it, &amp;quot;memoization&amp;quot;. I&amp;#39;d presume&lt;br&gt;&amp;gt; that the types involved change far less often than the data is&lt;br&gt;&amp;gt; accessed.&lt;p&gt;The database and its developers are mostly more succesful in deciding&lt;br&gt;how to optimize access to its tables than an application. This is one&lt;br&gt;of the organizational decisions a database implies.&lt;p&gt;&amp;gt; Some Google searching shows that most of the discussion around views&lt;br&gt;&amp;gt; and ActiveRecord focuses on either using updatable views or on doing&lt;br&gt;&amp;gt; read-only stuff with non-updatable views. I did find the Class-table&lt;br&gt;&amp;gt; Inheritance plugin, which may yield some insight for your project&lt;br&gt;&amp;gt; (docs @&lt;a href="http://clti.rubyforge.org/"&gt;http://clti.rubyforge.org/&lt;/a&gt;).&lt;p&gt;Ok, I&amp;#39;ll look closer into this.&lt;p&gt;&amp;gt; The biggest issue is that while&lt;br&gt;&amp;gt; views are part of the SQL standard, the rules for updating are very DB-&lt;br&gt;&amp;gt; specific. Since AR is targeted to be database-independent, the result&lt;br&gt;&amp;gt; is totally ignoring the feature.&lt;p&gt;Exactly - that&amp;#39;s why it would make sense to have a standard RoR method&lt;br&gt;for setting a DB function - see example in my first post - for&lt;br&gt;deriving the class; instead of a fixed column.&lt;p&gt;And concerning DB-views, which is a separate issue:&lt;br&gt;A standard RoR solution for DB-Views would be nice.&lt;p&gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5012662873997753565?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5012662873997753565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5012662873997753565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5012662873997753565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5012662873997753565'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-table-inheritance-based-on.html' title='[Rails] Re: Table Inheritance based on a function'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3580177825868157419</id><published>2009-07-04T07:28:00.001-07:00</published><updated>2009-07-04T07:28:42.489-07:00</updated><title type='text'>[Rails] Re: save! not allowed after validates_uniqueness</title><content type='html'>Can you please explain why you think the validation should be&lt;br&gt;&amp;quot;skipped&amp;quot;?&lt;p&gt;Cheers,&lt;br&gt;Nicholas&lt;p&gt;&lt;br&gt;On Jul 4, 5:59&amp;#160;am, Learn by Doing &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; Sorry, I meant The validation should SKIP the instance from which the&lt;br&gt;&amp;gt; method is called. &amp;#160;It appears that save! tries to validate the object&lt;br&gt;&amp;gt; against itself and fails because of course it is not unique from itself.&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3580177825868157419?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3580177825868157419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3580177825868157419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3580177825868157419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3580177825868157419'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-save-not-allowed-after.html' title='[Rails] Re: save! not allowed after validates_uniqueness'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1625708650385467347</id><published>2009-07-03T13:12:00.000-07:00</published><updated>2009-07-03T13:13:18.293-07:00</updated><title type='text'>[Rails] Re: Jruby + SQLServer</title><content type='html'>Thanks for your hellping.&lt;br&gt;&lt;br&gt;Sql server 2005&lt;br&gt;&lt;br&gt; - jruby-1.3.1&lt;br&gt;&lt;br&gt;&lt;b&gt;gem list &lt;/b&gt;&lt;br&gt;&lt;br&gt;actionmailer (2.3.2)&lt;br&gt;actionpack (2.3.2)&lt;br&gt;activerecord (2.3.2)&lt;br&gt;ActiveRecord-JDBC (0.5)&lt;br&gt;activerecord-jdbc-adapter (0.9.1)&lt;br&gt; activeresource (2.3.2)&lt;br&gt;activesupport (2.3.2)&lt;br&gt;builder (2.1.2)&lt;br&gt;camping (1.5.180)&lt;br&gt;jruby-openssl (0.5.1)&lt;br&gt;markaby (0.5)&lt;br&gt;metaid (1.0)&lt;br&gt;rails (2.3.2)&lt;br&gt;rake (0.8.7)&lt;br&gt;rspec (1.2.6)&lt;br&gt;sources (0.0.1)&lt;br&gt;&lt;br&gt; &lt;b&gt;I alredy try with jars:&lt;/b&gt;&lt;br&gt;sqljdbc.jar&lt;br&gt;jtds-1.2.jar&lt;br&gt;&lt;br&gt;I can do all steps but rake db:create don´t work &lt;br&gt;nothing happening&lt;br&gt;don´t show erros&lt;br&gt;don´t create db&lt;br&gt;&lt;br&gt;I have to create a easily intall app and i need  rake db:create&lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1625708650385467347?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1625708650385467347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1625708650385467347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1625708650385467347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1625708650385467347'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-jruby-sqlserver_03.html' title='[Rails] Re: Jruby + SQLServer'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7966379920987129708</id><published>2009-07-03T12:59:00.000-07:00</published><updated>2009-07-03T13:00:09.195-07:00</updated><title type='text'>[Rails] Re: Jruby + SQLServer</title><content type='html'>On Fri, Jul 3, 2009 at 7:44 AM, Augustus Costa&amp;lt;&lt;a href="mailto:augustuscosta@gmail.com"&gt;augustuscosta@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi, I&amp;#180;m using jruby and sqladapter.jar to conect in my sql server.&lt;br&gt;&amp;gt; but this integration dont work well yet.&lt;br&gt;&amp;gt; my database.yml config:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; host: localhost&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; adapter: jdbc&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; username: sasa&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; password: senha&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; driver: com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;br&gt;&amp;gt; &amp;#160;&amp;#160;&amp;#160; url: jdbc:sqlserver://localhost;databaseName=rails_teste&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; something wrong with this??&lt;p&gt;What error do you get? Did you include sqladapter.jar on the&lt;br&gt;classpath? Do you have the activerecord-jdbc-adapter gem installed?&lt;br&gt;What versions of all these (JRuby, activerecord-jdbc-adapter, Rails)?&lt;p&gt;/Nick&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7966379920987129708?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7966379920987129708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7966379920987129708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7966379920987129708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7966379920987129708'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-jruby-sqlserver.html' title='[Rails] Re: Jruby + SQLServer'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7339768369401591854</id><published>2009-07-03T12:51:00.001-07:00</published><updated>2009-07-03T12:51:28.891-07:00</updated><title type='text'>[Rails] Drag and Drop with Scriptaculous</title><content type='html'>I have two side by side lists on a page, form__list1 and form__list2.&lt;br&gt;I want to drag ffrom list 1 to list 2. I am terribly confused on what&lt;br&gt;I must set up to make this drag and drop with Scritpaculous occur (and&lt;br&gt;where --- do I put things in my views, shown below, or the&lt;br&gt;helpers...or the controller). I know how to get the values from&lt;br&gt;form__list2 in my controller.....I just need to know what to put in&lt;br&gt;(and where) to make the DnD via scriptaculus occur here. Thanks,&lt;br&gt;Janna, view below:&lt;p&gt;&amp;lt;div style=&amp;quot;float: left; width: 50%;&amp;quot;&amp;gt;&lt;br&gt;    	&amp;lt;% form__list1 = [] %&amp;gt;&lt;br&gt;		&amp;lt;% form__list1selected = [] %&amp;gt;&lt;br&gt;		&amp;lt;% options_for_select_hash = [] %&amp;gt;&lt;br&gt;		&amp;lt;% options_for_select_hash = Associate.find(:all,  :order =&amp;gt;&lt;br&gt;&amp;#39;username ASC&amp;#39;,  :conditions =&amp;gt; [&amp;quot;deleted=0 and (branch like ? or ?&lt;br&gt;like branch)&amp;quot;, @channel.defbranchcode,&lt;br&gt;@channel.defbranchcode]).collect {|p| [ p.username, &lt;a href="http://p.id"&gt;p.id&lt;/a&gt; ]} %&amp;gt;&lt;br&gt;		&amp;lt;%= select_tag(&amp;#39;form__list1[]&amp;#39;, options_for_select&lt;br&gt;(options_for_select_hash, form__list1selected&lt;br&gt;[options_for_select_hash.length]), html_options = {&amp;quot;size&amp;quot; =&amp;gt; 15,&lt;br&gt;&amp;quot;multiple&amp;quot; =&amp;gt; true, :style =&amp;gt; &amp;quot;width:200px&amp;quot;}) %&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;   &amp;lt;div style=&amp;quot;float: left;&amp;quot;&amp;gt;&lt;br&gt;    	&amp;lt;% form__list2 = [] %&amp;gt;&lt;br&gt;		&amp;lt;% form__list2selected = [] %&amp;gt;&lt;br&gt;		&amp;lt;%= select_tag(&amp;#39;form__list2[]&amp;#39;, options_for_select([],&lt;br&gt;form__list2selected[options_for_select_hash.length+Associate.find&lt;br&gt;(:all, :conditions =&amp;gt; [&amp;quot;deleted=0&amp;quot;]).length]), html_options = {&amp;quot;size&amp;quot;&lt;br&gt;=&amp;gt; 15, &amp;quot;multiple&amp;quot; =&amp;gt; true, :style =&amp;gt; &amp;quot;width:200px&amp;quot; }) %&amp;gt;&lt;br&gt;   &amp;lt;/div&amp;gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7339768369401591854?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7339768369401591854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7339768369401591854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7339768369401591854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7339768369401591854'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-drag-and-drop-with-scriptaculous.html' title='[Rails] Drag and Drop with Scriptaculous'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4818330117694625367</id><published>2009-07-03T12:48:00.001-07:00</published><updated>2009-07-03T12:48:43.253-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>Hmmm...&lt;p&gt;Thanks - I&amp;#39;ve tried it with &amp;quot;host: localhost&amp;quot; instead of socket, but&lt;br&gt;neither works - still get the &amp;quot;Protocol&amp;quot; error...&lt;p&gt;Any ideas?&lt;p&gt;&lt;p&gt;On Jul 3, 8:38&amp;#160;pm, &amp;quot;&amp;#196;lph&amp;#228; Bl&amp;#252;&amp;#235;&amp;quot; &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; Greg wrote:&lt;br&gt;&amp;gt; &amp;gt; Thanks for the response.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I&amp;#39;m actually just trying to get db:create to work first (although I&lt;br&gt;&amp;gt; &amp;gt; did try db:migrate to no avail). Surely db:create should work with&lt;br&gt;&amp;gt; &amp;gt; just &amp;quot;development&amp;quot; defined in the yml and existing in MySQL ????&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I will try creating and defining all three, just to be sure...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Yep, db:create works for development only while db:create:all works with&lt;br&gt;&amp;gt; all specified environments listed in your database.yml file.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; You don&amp;#39;t need the socket and you don&amp;#39;t need the root@ubi line either...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4818330117694625367?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4818330117694625367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4818330117694625367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4818330117694625367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4818330117694625367'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error_9983.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4662893073084660168</id><published>2009-07-03T12:40:00.000-07:00</published><updated>2009-07-03T12:41:44.747-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>nm - the message was tied together with your console output..&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4662893073084660168?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4662893073084660168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4662893073084660168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4662893073084660168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4662893073084660168'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error_7186.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5124965062032427284</id><published>2009-07-03T12:38:00.002-07:00</published><updated>2009-07-03T12:39:01.842-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>Greg wrote:&lt;br&gt;&amp;gt; Thanks for the response.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I&amp;#39;m actually just trying to get db:create to work first (although I&lt;br&gt;&amp;gt; did try db:migrate to no avail). Surely db:create should work with&lt;br&gt;&amp;gt; just &amp;quot;development&amp;quot; defined in the yml and existing in MySQL ????&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I will try creating and defining all three, just to be sure...&lt;p&gt;Yep, db:create works for development only while db:create:all works with &lt;br&gt;all specified environments listed in your database.yml file.&lt;p&gt;You don&amp;#39;t need the socket and you don&amp;#39;t need the root@ubi line either...&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5124965062032427284?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5124965062032427284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5124965062032427284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5124965062032427284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5124965062032427284'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error_4583.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-115231995776511269</id><published>2009-07-03T12:38:00.001-07:00</published><updated>2009-07-03T12:38:16.856-07:00</updated><title type='text'>[Rails] :all or noop operator for find_all_by_*?</title><content type='html'>Hello,&lt;p&gt;I&amp;#39;ve been looking for a way to noop a find_all_by. Use case: I have a  &lt;br&gt;function that takes a hash called options as argument, and that  &lt;br&gt;operates on a subset of Host objects as such:&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br&gt;client_id = options[:client] ? Client.find(options[:client]) : nil&lt;br&gt;old_hosts = client_id ?  &lt;br&gt;Host &lt;br&gt;.last_seen_before &lt;br&gt;(minutes.minutes.ago).find_all_by_client_id(client_id) :  &lt;br&gt;Host.last_seen_before(minutes.minutes.ago)&lt;br&gt;&amp;quot;&amp;quot;&amp;quot;&lt;br&gt;last_seen_before is a named_scope. If I had a noop for the  &lt;br&gt;find_all_by_client_id, I could make due of the client_id ? : part in  &lt;br&gt;the second line.&lt;p&gt;I admit that this is quite a simple a case, and that it doesn&amp;#39;t add  &lt;br&gt;much complexity to the program, but I&amp;#39;ll soon have to add some more  &lt;br&gt;filters and/or scopes, and I&amp;#39;d hate to make different calls depending  &lt;br&gt;on whether the option is set or not.&lt;p&gt;Does anyone know a way to make this less painfull?&lt;p&gt;Thanks,&lt;p&gt;Felix&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-115231995776511269?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/115231995776511269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=115231995776511269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/115231995776511269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/115231995776511269'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-all-or-noop-operator-for.html' title='[Rails] :all or noop operator for find_all_by_*?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-9129666482464576158</id><published>2009-07-03T12:34:00.000-07:00</published><updated>2009-07-03T12:35:01.605-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>Thanks for the response.&lt;p&gt;I&amp;#39;m actually just trying to get db:create to work first (although I&lt;br&gt;did try db:migrate to no avail). Surely db:create should work with&lt;br&gt;just &amp;quot;development&amp;quot; defined in the yml and existing in MySQL ????&lt;p&gt;I will try creating and defining all three, just to be sure...&lt;p&gt;On Jul 3, 8:20&amp;#160;pm, Rick &amp;lt;&lt;a href="mailto:richard.t.ll...@gmail.com"&gt;richard.t.ll...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Have you created the library_development, library_test, and&lt;br&gt;&amp;gt; library_production databases? &amp;#160;These need to be in place in mysql&lt;br&gt;&amp;gt; prior to any db:migrate calls.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; On Jul 2, 4:09&amp;#160;pm, Greg &amp;lt;&lt;a href="mailto:dartg...@googlemail.com"&gt;dartg...@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Hi,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I&amp;#39;m attempting to follow this tutorial:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&lt;a href="http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm"&gt;http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; To create a simple RoR app connected to a MySQL database. When I get&lt;br&gt;&amp;gt; &amp;gt; to the point where I have to run &amp;quot;rake db:create&amp;quot; I get the error&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;Protocol error - db:migrate&amp;quot;. E.g:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library# rake db:create&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; &amp;#160; &amp;#160; create&lt;br&gt;&amp;gt; &amp;gt; Protocol error - db:create&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library#&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I have no idea what this means and can find no information after&lt;br&gt;&amp;gt; &amp;gt; extensive googling. I&amp;#39;ll provide as much info about my environment/&lt;br&gt;&amp;gt; &amp;gt; setup as I know how to provide...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Any help or suggestions as to how I can figure this out? Please......&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Thanks,&lt;br&gt;&amp;gt; &amp;gt; Greg&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; ==============================================&lt;br&gt;&amp;gt; &amp;gt; I am running Ubuntu:&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library# uname -a&lt;br&gt;&amp;gt; &amp;gt; Linux ubi 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC&lt;br&gt;&amp;gt; &amp;gt; 2009 i686 GNU/Linux&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I am using Mysql server version 5.0&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/docs/procedis/dev/library# mysql -V&lt;br&gt;&amp;gt; &amp;gt; mysql &amp;#160;Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using&lt;br&gt;&amp;gt; &amp;gt; readline 5.2&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I am using ruby 1.8.7&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/docs/procedis/dev/library# ruby -v&lt;br&gt;&amp;gt; &amp;gt; ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I have the following:&lt;br&gt;&amp;gt; &amp;gt; *** LOCAL GEMS ***&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; actionmailer (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; actionpack (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; activerecord (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; activeresource (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; activesupport (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; mysql (2.7)&lt;br&gt;&amp;gt; &amp;gt; rails (2.3.2)&lt;br&gt;&amp;gt; &amp;gt; rake (0.8.7)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; This is my database yml file:&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library# more config/database.yml&lt;br&gt;&amp;gt; &amp;gt; development:&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; adapter: mysql&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; encoding: utf8&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; database: library_development&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; pool: 5&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; username: root&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; password: xxxxxxxx&lt;br&gt;&amp;gt; &amp;gt; &amp;#160; socket: /var/run/mysqld/mysqld.sock&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library#&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; (I have also tried with &amp;quot;host: localhost&amp;quot; instead of socket)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I am able to connect to the mysql database using the dbconsole:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; root@ubi:/home/greg/dev/library# ruby script/dbconsole&lt;br&gt;&amp;gt; &amp;gt; Enter password:&lt;br&gt;&amp;gt; &amp;gt; Welcome to the MySQL monitor. &amp;#160;Commands end with ; or \g.&lt;br&gt;&amp;gt; &amp;gt; Your MySQL connection id is 37&lt;br&gt;&amp;gt; &amp;gt; Server version: 5.0.75-0ubuntu10.2 (Ubuntu)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Type &amp;#39;help;&amp;#39; or &amp;#39;\h&amp;#39; for help. Type &amp;#39;\c&amp;#39; to clear the buffer.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; mysql&amp;gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-9129666482464576158?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/9129666482464576158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=9129666482464576158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/9129666482464576158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/9129666482464576158'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error_8108.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-286800782520222739</id><published>2009-07-03T12:33:00.000-07:00</published><updated>2009-07-03T12:34:14.024-07:00</updated><title type='text'>[Rails] Re: How to dynamically load plugin files on every request?</title><content type='html'>Vikrant wrote:&lt;br&gt;&amp;gt; Hi,&lt;br&gt;&amp;gt;  I have been developing a Rails plugin recently, and I have realised&lt;br&gt;&amp;gt; that for every change I make into files of my plugin, I have to&lt;br&gt;&amp;gt; restart the server to make changes take effect. While changes at&lt;br&gt;&amp;gt; application&amp;#39;s own file appear instantly.&lt;br&gt;&amp;gt; I&amp;#39;m writing only after I searched for an answer over web but didn&amp;#39;t&lt;br&gt;&amp;gt; find any. It&amp;#39;s getting irritating now.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -thanks&lt;p&gt;I think it comes down to what type of plugin you are using first of all. &lt;br&gt;If the plugin communicates with a database or something that can change &lt;br&gt;dynamically then it can be done.&lt;p&gt;You can specify a configs environment with your plugin for how it &lt;br&gt;behaves via option types.  Load those in a database and have an admin &lt;br&gt;page that changes the way it works there.  I do this with a CMS plugin I &lt;br&gt;created for my site.&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-286800782520222739?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/286800782520222739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=286800782520222739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/286800782520222739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/286800782520222739'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-how-to-dynamically-load-plugin.html' title='[Rails] Re: How to dynamically load plugin files on every request?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-11926597303218895</id><published>2009-07-03T12:27:00.000-07:00</published><updated>2009-07-03T12:28:02.925-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>development:&lt;br&gt;  adapter: mysql&lt;br&gt;  encoding: utf8&lt;br&gt;  reconnect: true&lt;br&gt;  database: library_development&lt;br&gt;  pool: 5&lt;br&gt;  username: root&lt;br&gt;  password: xxxxxxxx&lt;br&gt;  host: localhost&lt;p&gt;This should be fine. You don&amp;#39;t need to specify the socket.  Are you &lt;br&gt;connecting on a particular port?  If you are, you need to specify the &lt;br&gt;port if it&amp;#39;s different than the normal 3306 I believe for mysql...&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-11926597303218895?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/11926597303218895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=11926597303218895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/11926597303218895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/11926597303218895'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error_03.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3290312763491767611</id><published>2009-07-03T12:20:00.001-07:00</published><updated>2009-07-03T12:20:47.405-07:00</updated><title type='text'>[Rails] Re: rake db:create == Protocol error</title><content type='html'>Have you created the library_development, library_test, and&lt;br&gt;library_production databases?  These need to be in place in mysql&lt;br&gt;prior to any db:migrate calls.&lt;p&gt;On Jul 2, 4:09&amp;#160;pm, Greg &amp;lt;&lt;a href="mailto:dartg...@googlemail.com"&gt;dartg...@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;m attempting to follow this tutorial:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &lt;a href="http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm"&gt;http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; To create a simple RoR app connected to a MySQL database. When I get&lt;br&gt;&amp;gt; to the point where I have to run &amp;quot;rake db:create&amp;quot; I get the error&lt;br&gt;&amp;gt; &amp;quot;Protocol error - db:migrate&amp;quot;. E.g:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library# rake db:create&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; create&lt;br&gt;&amp;gt; Protocol error - db:create&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library#&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have no idea what this means and can find no information after&lt;br&gt;&amp;gt; extensive googling. I&amp;#39;ll provide as much info about my environment/&lt;br&gt;&amp;gt; setup as I know how to provide...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Any help or suggestions as to how I can figure this out? Please......&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Thanks,&lt;br&gt;&amp;gt; Greg&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; ==============================================&lt;br&gt;&amp;gt; I am running Ubuntu:&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library# uname -a&lt;br&gt;&amp;gt; Linux ubi 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC&lt;br&gt;&amp;gt; 2009 i686 GNU/Linux&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I am using Mysql server version 5.0&lt;br&gt;&amp;gt; root@ubi:/home/greg/docs/procedis/dev/library# mysql -V&lt;br&gt;&amp;gt; mysql &amp;#160;Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using&lt;br&gt;&amp;gt; readline 5.2&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I am using ruby 1.8.7&lt;br&gt;&amp;gt; root@ubi:/home/greg/docs/procedis/dev/library# ruby -v&lt;br&gt;&amp;gt; ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have the following:&lt;br&gt;&amp;gt; *** LOCAL GEMS ***&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; actionmailer (2.3.2)&lt;br&gt;&amp;gt; actionpack (2.3.2)&lt;br&gt;&amp;gt; activerecord (2.3.2)&lt;br&gt;&amp;gt; activeresource (2.3.2)&lt;br&gt;&amp;gt; activesupport (2.3.2)&lt;br&gt;&amp;gt; mysql (2.7)&lt;br&gt;&amp;gt; rails (2.3.2)&lt;br&gt;&amp;gt; rake (0.8.7)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; This is my database yml file:&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library# more config/database.yml&lt;br&gt;&amp;gt; development:&lt;br&gt;&amp;gt; &amp;#160; adapter: mysql&lt;br&gt;&amp;gt; &amp;#160; encoding: utf8&lt;br&gt;&amp;gt; &amp;#160; database: library_development&lt;br&gt;&amp;gt; &amp;#160; pool: 5&lt;br&gt;&amp;gt; &amp;#160; username: root&lt;br&gt;&amp;gt; &amp;#160; password: xxxxxxxx&lt;br&gt;&amp;gt; &amp;#160; socket: /var/run/mysqld/mysqld.sock&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library#&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; (I have also tried with &amp;quot;host: localhost&amp;quot; instead of socket)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I am able to connect to the mysql database using the dbconsole:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; root@ubi:/home/greg/dev/library# ruby script/dbconsole&lt;br&gt;&amp;gt; Enter password:&lt;br&gt;&amp;gt; Welcome to the MySQL monitor. &amp;#160;Commands end with ; or \g.&lt;br&gt;&amp;gt; Your MySQL connection id is 37&lt;br&gt;&amp;gt; Server version: 5.0.75-0ubuntu10.2 (Ubuntu)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Type &amp;#39;help;&amp;#39; or &amp;#39;\h&amp;#39; for help. Type &amp;#39;\c&amp;#39; to clear the buffer.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; mysql&amp;gt;&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3290312763491767611?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3290312763491767611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3290312763491767611' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3290312763491767611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3290312763491767611'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rake-dbcreate-protocol-error.html' title='[Rails] Re: rake db:create == Protocol error'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6598883725018965788</id><published>2009-07-03T12:17:00.001-07:00</published><updated>2009-07-03T12:17:43.857-07:00</updated><title type='text'>[Rails] Re: Params Merge and URL sorting/pagination</title><content type='html'>Okay I figured 80% of this out on my own after some trial and testing. &lt;br&gt;I still need help with params.merge on the forms only.  Here&amp;#39;s what I &lt;br&gt;did for the rest:&lt;p&gt;  def sort_column(title, direction)&lt;br&gt;    direction == &amp;quot;asc&amp;quot; ? image = &amp;quot;up.gif&amp;quot; : image = &amp;quot;down.gif&amp;quot;&lt;br&gt;    (link_to image_tag(image, :border=&amp;gt;0, :alt =&amp;gt; direction), &lt;br&gt;params.merge(:controller =&amp;gt; controller.controller_name, :numteams =&amp;gt; &lt;br&gt;(@showall ? 120 : nil), :orderby =&amp;gt; title, :sortby =&amp;gt; direction))&lt;br&gt;  end&lt;br&gt;  # adds a button to show all teams on tables based on controller name &lt;br&gt;called.&lt;br&gt;  def show_all_teams&lt;br&gt;    (link_to &amp;quot;Show All Teams&amp;quot;, params.merge(:controller =&amp;gt; &lt;br&gt;controller.controller_name, :numteams =&amp;gt; 120, :orderby =&amp;gt; &amp;#39;rank&amp;#39;, &lt;br&gt;:sortby =&amp;gt; &amp;#39;asc&amp;#39;, :page =&amp;gt; 1, :search =&amp;gt; nil)) if !@showall&lt;br&gt;  end&lt;br&gt;  # adds a button to show simplified views on tables based on controller &lt;br&gt;ame called..&lt;br&gt;  def show_simple_view&lt;br&gt;    (link_to &amp;quot;Show Simple View&amp;quot;, params.merge(:controller =&amp;gt; &lt;br&gt;controller.controller_name, :numteams =&amp;gt; nil, :orderby =&amp;gt; &amp;#39;rank&amp;#39;, &lt;br&gt;:sortby =&amp;gt; &amp;#39;asc&amp;#39;)) if @showall || @searchteams&lt;br&gt;  end&lt;p&gt;I added params.merge to the link tos and it just merged the params with &lt;br&gt;the existing ones with no changes.  I had to modify the Show All Teams &lt;br&gt;link to show :page =&amp;gt; 1 since it would get stuck if it was on simple &lt;br&gt;view and a page requester was say on 3..  I also had to change the &lt;br&gt;:search =&amp;gt; nil so that show all would clear any search results and show &lt;br&gt;all teams.&lt;p&gt;This entire fix worked for 80% of the content.&lt;p&gt;Now, I still have issues with my forms.  Here are the views:&lt;p&gt;      &amp;lt;td align=&amp;quot;left&amp;quot; valign=&amp;quot;middle&amp;quot;&amp;gt;&lt;br&gt;        &amp;lt;% form_tag controller.controller_path, :method =&amp;gt; &amp;#39;get&amp;#39; do %&amp;gt;&lt;br&gt;          &amp;lt;%= hinted_text_field_tag :search, params[:search], &amp;quot;Enter &lt;br&gt;Team&amp;quot; %&amp;gt;&lt;br&gt;          &amp;lt;%= submit_tag &amp;quot;Team Search&amp;quot;, :name =&amp;gt; nil %&amp;gt;&lt;br&gt;        &amp;lt;% end %&amp;gt;&lt;br&gt;      &amp;lt;/td&amp;gt;&lt;br&gt;      &amp;lt;td align=&amp;quot;left&amp;quot; valign=&amp;quot;middle&amp;quot;&amp;gt;&lt;br&gt;        &amp;lt;% form_tag controller.controller_path, :method =&amp;gt; &amp;#39;get&amp;#39; do %&amp;gt;&lt;br&gt;          &amp;lt;%= calendariffic_input(true, :compiled_on, &lt;br&gt;&amp;#39;calendariffic/date.png&amp;#39;, &amp;#39;search_cal&amp;#39;, &amp;#39;%Y-%m-%d&amp;#39;, &lt;br&gt;params[:compiled_on], {}, {:class =&amp;gt; &amp;#39;borderless&amp;#39;}) %&amp;gt;&lt;br&gt;          &amp;lt;%= submit_tag &amp;quot;Date Search&amp;quot;, :name =&amp;gt; nil %&amp;gt;&lt;br&gt;        &amp;lt;% end %&amp;gt;&lt;br&gt;      &amp;lt;/td&amp;gt;&lt;p&gt;How do I use params merge with the forms?&lt;p&gt;Many thanks in advance.&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6598883725018965788?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6598883725018965788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6598883725018965788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6598883725018965788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6598883725018965788'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-params-merge-and-url.html' title='[Rails] Re: Params Merge and URL sorting/pagination'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6854697308111677445</id><published>2009-07-03T11:10:00.000-07:00</published><updated>2009-07-03T11:11:04.285-07:00</updated><title type='text'>[Rails] Re: Can't install RMagick due to MagickWand problems</title><content type='html'>I had the same problem today... &lt;br&gt;Solved with:&lt;br&gt;&lt;br&gt;apt-get -y install libmagick9-dev&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Parra&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jul 3, 2009 at 10:28 AM, Heinz Strunk &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"&gt;&lt;br&gt; Hello,&lt;br&gt; &lt;br&gt; I&amp;#39;m trying to install/update rmagick on a Debian machine using:&lt;br&gt; gem install --local rmagick-2.10.0.gem&lt;br&gt; &lt;br&gt; and get following error:&lt;br&gt; /usr/local/bin/ruby extconf.rb install --local rmagick-2.10.0.gem&lt;br&gt; checking for Ruby version &amp;gt;= 1.8.5... yes&lt;br&gt; checking for gcc... yes&lt;br&gt; checking for Magick-config... yes&lt;br&gt; &lt;br&gt; Warning: Found more than one ImageMagick installation. This could cause&lt;br&gt; problems at runtime.&lt;br&gt;          /usr/bin/Magick-config reports version 6.5.4-0 is installed in&lt;br&gt; /usr&lt;br&gt;          /usr/bin/X11/Magick-config reports version 6.5.4-0 is installed&lt;br&gt; in /usr&lt;br&gt; Using 6.5.4-0 from /usr.&lt;br&gt; &lt;br&gt; checking for ImageMagick version &amp;gt;= 6.3.5... yes&lt;br&gt; checking for HDRI disabled version of ImageMagick... yes&lt;br&gt; checking for stdint.h... yes&lt;br&gt; checking for sys/types.h... yes&lt;br&gt; checking for wand/MagickWand.h... no&lt;br&gt; &lt;br&gt; Can&amp;#39;t install RMagick 2.10.0. Can&amp;#39;t find MagickWand.h.&lt;br&gt; *** extconf.rb failed ***&lt;br&gt; Could not create Makefile due to some reason, probably lack of&lt;br&gt; necessary libraries and/or headers.  Check the mkmf.log file for more&lt;br&gt; details.  You may need configuration options.&lt;br&gt; &lt;br&gt; But want is installed:&lt;br&gt; :/usr/local/include/ImageMagick# ls -la&lt;br&gt; insgesamt 24&lt;br&gt; drwxr-sr-x  6 root staff 4096 2009-07-03 15:23 .&lt;br&gt; drwxrwsr-x 10 root staff 4096 2009-06-27 18:50 ..&lt;br&gt; drwxr-sr-x  2 root staff 4096 2009-06-27 19:27 bin&lt;br&gt; drwxr-sr-x  3 root staff 4096 2009-06-27 19:21 include&lt;br&gt; drwxr-sr-x  4 root staff 4096 2009-06-27 19:27 lib&lt;br&gt; drwxr-sr-x  5 root staff 4096 2009-06-27 19:21 share&lt;br&gt; lrwxrwxrwx  1 root staff   55 2009-07-03 15:23 wand -&amp;gt;&lt;br&gt; /usr/local/include/ImageMagick/include/ImageMagick/wand&lt;br&gt; &lt;br&gt; Anyone knows what&amp;#39;s wrong there?&lt;br&gt; --&lt;br&gt; Posted via &lt;a href="http://www.ruby-forum.com/" target="_blank"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6854697308111677445?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6854697308111677445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6854697308111677445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6854697308111677445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6854697308111677445'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-cant-install-rmagick-due-to_03.html' title='[Rails] Re: Can&apos;t install RMagick due to MagickWand problems'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4027999544110423394</id><published>2009-07-03T11:04:00.001-07:00</published><updated>2009-07-03T11:04:15.755-07:00</updated><title type='text'>[Rails] How to dynamically load plugin files on every request?</title><content type='html'>Hi,&lt;br&gt; I have been developing a Rails plugin recently, and I have realised&lt;br&gt;that for every change I make into files of my plugin, I have to&lt;br&gt;restart the server to make changes take effect. While changes at&lt;br&gt;application&amp;#39;s own file appear instantly.&lt;br&gt;I&amp;#39;m writing only after I searched for an answer over web but didn&amp;#39;t&lt;br&gt;find any. It&amp;#39;s getting irritating now.&lt;p&gt;-thanks&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4027999544110423394?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4027999544110423394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4027999544110423394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4027999544110423394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4027999544110423394'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-how-to-dynamically-load-plugin.html' title='[Rails] How to dynamically load plugin files on every request?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1981985625010961212</id><published>2009-07-03T11:00:00.001-07:00</published><updated>2009-07-03T11:00:43.956-07:00</updated><title type='text'>[Rails] Re: Can't install RMagick due to MagickWand problems</title><content type='html'>&amp;gt; On Jul 3, 9:28&amp;#160;am, Heinz Strunk &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hello,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;m trying to install/update rmagick on a Debian machine using:&lt;br&gt;&amp;gt; gem install --local rmagick-2.10.0.gem&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; and get following error:&lt;br&gt;&amp;gt; /usr/local/bin/ruby extconf.rb install --local rmagick-2.10.0.gem&lt;br&gt;&amp;gt; checking for Ruby version &amp;gt;= 1.8.5... yes&lt;br&gt;&amp;gt; checking for gcc... yes&lt;br&gt;&amp;gt; checking for Magick-config... yes&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Warning: Found more than one ImageMagick installation. This could cause&lt;br&gt;&amp;gt; problems at runtime.&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;/usr/bin/Magick-config reports version 6.5.4-0 is installed in&lt;br&gt;&amp;gt; /usr&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;/usr/bin/X11/Magick-config reports version 6.5.4-0 is installed&lt;br&gt;&amp;gt; in /usr&lt;br&gt;&amp;gt; Using 6.5.4-0 from /usr.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; checking for ImageMagick version &amp;gt;= 6.3.5... yes&lt;br&gt;&amp;gt; checking for HDRI disabled version of ImageMagick... yes&lt;br&gt;&amp;gt; checking for stdint.h... yes&lt;br&gt;&amp;gt; checking for sys/types.h... yes&lt;br&gt;&amp;gt; checking for wand/MagickWand.h... no&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Can&amp;#39;t install RMagick 2.10.0. Can&amp;#39;t find MagickWand.h.&lt;br&gt;&amp;gt; *** extconf.rb failed ***&lt;br&gt;&amp;gt; Could not create Makefile due to some reason, probably lack of&lt;br&gt;&amp;gt; necessary libraries and/or headers. &amp;#160;Check the mkmf.log file for more&lt;br&gt;&amp;gt; details. &amp;#160;You may need configuration options.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; But want is installed:&lt;br&gt;&amp;gt; :/usr/local/include/ImageMagick# ls -la&lt;br&gt;&amp;gt; insgesamt 24&lt;br&gt;&amp;gt; drwxr-sr-x &amp;#160;6 root staff 4096 2009-07-03 15:23 .&lt;br&gt;&amp;gt; drwxrwsr-x 10 root staff 4096 2009-06-27 18:50 ..&lt;br&gt;&amp;gt; drwxr-sr-x &amp;#160;2 root staff 4096 2009-06-27 19:27 bin&lt;br&gt;&amp;gt; drwxr-sr-x &amp;#160;3 root staff 4096 2009-06-27 19:21 include&lt;br&gt;&amp;gt; drwxr-sr-x &amp;#160;4 root staff 4096 2009-06-27 19:27 lib&lt;br&gt;&amp;gt; drwxr-sr-x &amp;#160;5 root staff 4096 2009-06-27 19:21 share&lt;br&gt;&amp;gt; lrwxrwxrwx &amp;#160;1 root staff &amp;#160; 55 2009-07-03 15:23 wand -&amp;gt;&lt;br&gt;&amp;gt; /usr/local/include/ImageMagick/include/ImageMagick/wand&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Anyone knows what&amp;#39;s wrong there?&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;try&lt;p&gt;sudo apt-get install libmagickcore-dev libmagickwand-dev&lt;p&gt;?&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1981985625010961212?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1981985625010961212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1981985625010961212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1981985625010961212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1981985625010961212'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-cant-install-rmagick-due-to.html' title='[Rails] Re: Can&apos;t install RMagick due to MagickWand problems'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-6806175273716483497</id><published>2009-07-03T10:58:00.001-07:00</published><updated>2009-07-03T10:58:58.948-07:00</updated><title type='text'>[Rails] Re: Rails and Git: Rails code to serve git repositories?</title><content type='html'>Rimantas Liubertas wrote:&lt;br&gt;[...]&lt;br&gt;&amp;gt; Well, another (costly!) possibility is to buy the real deal:&lt;br&gt;&amp;gt; &lt;a href="http://fi.github.com/"&gt;http://fi.github.com/&lt;/a&gt;&lt;p&gt;I didn&amp;#39;t know they were doing that now!&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; Regards,&lt;br&gt;&amp;gt; Rimantas&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; &lt;a href="http://rimantas.com/"&gt;http://rimantas.com/&lt;/a&gt;&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-6806175273716483497?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/6806175273716483497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=6806175273716483497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6806175273716483497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/6806175273716483497'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rails-and-git-rails-code-to_8965.html' title='[Rails] Re: Rails and Git: Rails code to serve git repositories?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-4870748453503436349</id><published>2009-07-03T10:42:00.000-07:00</published><updated>2009-07-03T10:43:10.118-07:00</updated><title type='text'>[Rails] Re: Rails and Git: Rails code to serve git repositories?</title><content type='html'>&amp;gt; I don&amp;#39;t think there&amp;#39;s anything available, unless Gitorious has released&lt;br&gt;&amp;gt; its source (is that written with Rails? not sure), which is part of the&lt;br&gt;&amp;gt; reason that Github is such a big deal. &amp;#160;You probably want to shell out&lt;br&gt;&amp;gt; to a native Git client, although Grit is also a possibility.&lt;p&gt;Well, another (costly!) possibility is to buy the real deal:&lt;br&gt;&lt;a href="http://fi.github.com/"&gt;http://fi.github.com/&lt;/a&gt;&lt;p&gt;Regards,&lt;br&gt;Rimantas&lt;br&gt;--&lt;br&gt;&lt;a href="http://rimantas.com/"&gt;http://rimantas.com/&lt;/a&gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-4870748453503436349?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/4870748453503436349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=4870748453503436349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4870748453503436349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/4870748453503436349'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rails-and-git-rails-code-to_03.html' title='[Rails] Re: Rails and Git: Rails code to serve git repositories?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3383694808029734033</id><published>2009-07-03T10:02:00.000-07:00</published><updated>2009-07-03T10:03:29.197-07:00</updated><title type='text'>[Rails] Re: Plugin for personal messages system?</title><content type='html'>A quick search of the plugin directory turned up these results, in addition to the plugin you mentioned:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://agilewebdevelopment.com/plugins/easy_messages"&gt;Easy_Messages&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://agilewebdevelopment.com/plugins/restful_easy_messages"&gt;Restful_Easy_Messages&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;a href="http://agilewebdevelopment.com/plugins/simple_private_messaging"&gt;Simple Private Messages&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://agilewebdevelopment.com/plugins/acts_as_emailable"&gt;acts_as_emailable&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://agilewebdevelopment.com/plugins/has_messages"&gt;has_messages&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;br clear="all"&gt;--&lt;br&gt;Benjamin Curtis &lt;br&gt;&lt;a href="http://railskits.com/"&gt;http://railskits.com/&lt;/a&gt; - Ready-made Rails code &lt;br&gt;&lt;a href="http://catchthebest.com/"&gt;http://catchthebest.com/&lt;/a&gt; - Team-powered recruiting &lt;br&gt;  &lt;a href="http://www.bencurtis.com/"&gt;http://www.bencurtis.com/&lt;/a&gt; - Personal blog&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jul 3, 2009 at 12:26 AM, Evgeniy Dolzhenko &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:dolzenko@gmail.com"&gt;dolzenko@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"&gt;  &lt;br&gt; Hi all,&lt;br&gt; &lt;br&gt; I&amp;#39;m kind of surprised there is no maintained plugin which can get me&lt;br&gt; out-of-the box personal messages system.&lt;br&gt; &lt;br&gt; The only two close things google cames up with is&lt;br&gt; &lt;a href="http://github.com/psergi/acts_as_messageable/tree/master" target="_blank"&gt;http://github.com/psergi/acts_as_messageable/tree/master&lt;/a&gt; plugin (I&lt;br&gt; would love to have some generic views also created for me, but this&lt;br&gt; one doesn&amp;#39;t seem to offer that).&lt;br&gt; &lt;br&gt; And pretty old tutorial &lt;a href="http://www.novawave.net/public/rails_messaging_tutorial.html" target="_blank"&gt;http://www.novawave.net/public/rails_messaging_tutorial.html&lt;/a&gt;&lt;br&gt; .&lt;br&gt; &lt;br&gt; And that&amp;#39;s it.&lt;br&gt; &lt;br&gt; I guess my only option then is to cannibalize some other open source&lt;br&gt; project to get required functionality, but that is also on the verge&lt;br&gt; of &amp;quot;better to write my own&amp;quot;?&lt;br&gt; &lt;br&gt; TIA,&lt;br&gt; Evgeniy&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt; &lt;br&gt; --~--~---------~--~----~------------~-------~--~----~&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group. &lt;br&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com &lt;br&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com &lt;br&gt; For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en&lt;br&gt; -~----------~----~----~----~------~----~------~--~---&lt;br&gt; &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3383694808029734033?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3383694808029734033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3383694808029734033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3383694808029734033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3383694808029734033'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-plugin-for-personal-messages.html' title='[Rails] Re: Plugin for personal messages system?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-5778524166503153604</id><published>2009-07-03T09:59:00.001-07:00</published><updated>2009-07-03T09:59:22.228-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>OK, could have been a version conflict between Rails and&lt;br&gt;attachment-fu. One thing I didn&amp;#39;t think of asking was to ensure you&lt;br&gt;had run the migrations in production. Pleased to hear you are good to&lt;br&gt;go.&lt;p&gt;Cheers,&lt;br&gt;Nicholas	&lt;p&gt;&lt;br&gt;On Fri, Jul 3, 2009 at 12:55 PM, Heinz&lt;br&gt;Strunk&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I just updated attachment_fu and did a db:migrate:reset and now&lt;br&gt;&amp;gt; everything works like a charm :) Thank you!&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-5778524166503153604?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/5778524166503153604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=5778524166503153604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5778524166503153604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/5778524166503153604'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_2701.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-161448120916715223</id><published>2009-07-03T09:55:00.000-07:00</published><updated>2009-07-03T09:56:05.423-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>I just updated attachment_fu and did a db:migrate:reset and now &lt;br&gt;everything works like a charm :) Thank you!&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-161448120916715223?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/161448120916715223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=161448120916715223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/161448120916715223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/161448120916715223'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_6469.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8485811826101493509</id><published>2009-07-03T09:48:00.002-07:00</published><updated>2009-07-03T09:49:16.101-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>I meant attachment_fu&lt;p&gt;On Fri, Jul 3, 2009 at 12:48 PM, Nicholas Henry&amp;lt;&lt;a href="mailto:nicholas.henry@gmail.com"&gt;nicholas.henry@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Have you tried updating attribute_fu? Where did you source it from?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; On Fri, Jul 3, 2009 at 12:43 PM, Heinz&lt;br&gt;&amp;gt; Strunk&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; Hey,&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; I was running 2.1.0 on my local machine as well but I updated it to&lt;br&gt;&amp;gt;&amp;gt; 2.2.2 but with no effect:&lt;br&gt;&amp;gt;&amp;gt; ActionView::TemplateError (undefined local variable or method `filename&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; for #&amp;lt;News:0x40ec017c&amp;gt;) on line #8 of app/views/news/index.html.erb:&lt;br&gt;&amp;gt;&amp;gt; 5: &amp;#160; &amp;lt;/tr&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 6: &amp;#160; &amp;lt;tr&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 7: &amp;#160; &amp;#160;&amp;lt;td class=&amp;quot;news_table_pic&amp;quot;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 8: &amp;#160; &amp;#160; &amp;lt;%= image_tag(news.public_filename) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 9: &amp;#160; &amp;#160; Erstellt am &amp;lt;%= news.created_at.strftime(&amp;quot;%d.%m.%Y&amp;quot;) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 10: &amp;#160; &amp;#160; von &amp;lt;%=h news.author %&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; 11: &amp;#160; &amp;#160;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:260:in&lt;br&gt;&amp;gt;&amp;gt; `method_missing&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:233:in&lt;br&gt;&amp;gt;&amp;gt; `thumbnail_name_for&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in&lt;br&gt;&amp;gt;&amp;gt; `full_filename&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:43:in&lt;br&gt;&amp;gt;&amp;gt; `public_filename&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:8&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1:in `each&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in&lt;br&gt;&amp;gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in&lt;br&gt;&amp;gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in&lt;br&gt;&amp;gt;&amp;gt; `render_template&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in&lt;br&gt;&amp;gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:367:in&lt;br&gt;&amp;gt;&amp;gt; `_render_with_layout&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:254:in&lt;br&gt;&amp;gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in&lt;br&gt;&amp;gt;&amp;gt; `render_for_file&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in&lt;br&gt;&amp;gt;&amp;gt; `render_without_benchmark&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in&lt;br&gt;&amp;gt;&amp;gt; `realtime&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in&lt;br&gt;&amp;gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in&lt;br&gt;&amp;gt;&amp;gt; `custom&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in&lt;br&gt;&amp;gt;&amp;gt; `call&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in&lt;br&gt;&amp;gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in&lt;br&gt;&amp;gt;&amp;gt; `each&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in&lt;br&gt;&amp;gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in&lt;br&gt;&amp;gt;&amp;gt; `respond_to&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;app/controllers/news_controller.rb:22:in `index&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in&lt;br&gt;&amp;gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action_without_filters&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in&lt;br&gt;&amp;gt;&amp;gt; `call_filters&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action_without_benchmark&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action_without_caching&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in&lt;br&gt;&amp;gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in&lt;br&gt;&amp;gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in&lt;br&gt;&amp;gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in&lt;br&gt;&amp;gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in&lt;br&gt;&amp;gt;&amp;gt; `process_without_filters&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in&lt;br&gt;&amp;gt;&amp;gt; `process_without_session_management_support&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in&lt;br&gt;&amp;gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt;&amp;gt; ...&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; Any other ideas?&lt;br&gt;&amp;gt;&amp;gt; --&lt;br&gt;&amp;gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8485811826101493509?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8485811826101493509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8485811826101493509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8485811826101493509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8485811826101493509'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_3942.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7164862878755026025</id><published>2009-07-03T09:48:00.001-07:00</published><updated>2009-07-03T09:48:55.993-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Have you tried updating attribute_fu? Where did you source it from?&lt;p&gt;On Fri, Jul 3, 2009 at 12:43 PM, Heinz&lt;br&gt;Strunk&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Hey,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I was running 2.1.0 on my local machine as well but I updated it to&lt;br&gt;&amp;gt; 2.2.2 but with no effect:&lt;br&gt;&amp;gt; ActionView::TemplateError (undefined local variable or method `filename&amp;#39;&lt;br&gt;&amp;gt; for #&amp;lt;News:0x40ec017c&amp;gt;) on line #8 of app/views/news/index.html.erb:&lt;br&gt;&amp;gt; 5: &amp;#160; &amp;lt;/tr&amp;gt;&lt;br&gt;&amp;gt; 6: &amp;#160; &amp;lt;tr&amp;gt;&lt;br&gt;&amp;gt; 7: &amp;#160; &amp;#160;&amp;lt;td class=&amp;quot;news_table_pic&amp;quot;&amp;gt;&lt;br&gt;&amp;gt; 8: &amp;#160; &amp;#160; &amp;lt;%= image_tag(news.public_filename) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt; 9: &amp;#160; &amp;#160; Erstellt am &amp;lt;%= news.created_at.strftime(&amp;quot;%d.%m.%Y&amp;quot;) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt; 10: &amp;#160; &amp;#160; von &amp;lt;%=h news.author %&amp;gt;&lt;br&gt;&amp;gt; 11: &amp;#160; &amp;#160;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:260:in&lt;br&gt;&amp;gt; `method_missing&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:233:in&lt;br&gt;&amp;gt; `thumbnail_name_for&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in&lt;br&gt;&amp;gt; `full_filename&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:43:in&lt;br&gt;&amp;gt; `public_filename&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:8&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1:in `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in&lt;br&gt;&amp;gt; `render_template&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:367:in&lt;br&gt;&amp;gt; `_render_with_layout&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:254:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in&lt;br&gt;&amp;gt; `render_for_file&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in&lt;br&gt;&amp;gt; `render_without_benchmark&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in&lt;br&gt;&amp;gt; `realtime&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in&lt;br&gt;&amp;gt; `custom&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in&lt;br&gt;&amp;gt; `call&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in&lt;br&gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in&lt;br&gt;&amp;gt; `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in&lt;br&gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in&lt;br&gt;&amp;gt; `respond_to&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/controllers/news_controller.rb:22:in `index&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in&lt;br&gt;&amp;gt; `perform_action_without_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in&lt;br&gt;&amp;gt; `call_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in&lt;br&gt;&amp;gt; `perform_action_without_benchmark&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in&lt;br&gt;&amp;gt; `perform_action_without_caching&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in&lt;br&gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in&lt;br&gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in&lt;br&gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in&lt;br&gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in&lt;br&gt;&amp;gt; `process_without_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in&lt;br&gt;&amp;gt; `process_without_session_management_support&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in&lt;br&gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt; ...&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Any other ideas?&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7164862878755026025?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7164862878755026025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7164862878755026025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7164862878755026025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7164862878755026025'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_7432.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3584390463047852698</id><published>2009-07-03T09:45:00.000-07:00</published><updated>2009-07-03T09:46:00.498-07:00</updated><title type='text'>[Rails] Re: Rails and Git: Rails code to serve git repositories?</title><content type='html'>Bjorn Boulder wrote:&lt;br&gt;&amp;gt; rails and git people,&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; I am searching for some Rails code I can use to serve git&lt;br&gt;&amp;gt; repositories.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Please alert me if you know of any projects which have this use-case.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; In other words I want to create my own github.&lt;p&gt;I don&amp;#39;t think there&amp;#39;s anything available, unless Gitorious has released &lt;br&gt;its source (is that written with Rails? not sure), which is part of the &lt;br&gt;reason that Github is such a big deal.  You probably want to shell out &lt;br&gt;to a native Git client, although Grit is also a possibility.&lt;p&gt;If you want to collaborate on this, e-mail me.  I&amp;#39;ve been thinking of &lt;br&gt;trying something like this myself.&lt;p&gt;Best,&lt;br&gt;--&lt;br&gt;Marnen Laibow-Koser&lt;br&gt;&lt;a href="http://www.marnen.org"&gt;http://www.marnen.org&lt;/a&gt;&lt;br&gt;&lt;a href="mailto:marnen@marnen.org"&gt;marnen@marnen.org&lt;/a&gt;&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3584390463047852698?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3584390463047852698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3584390463047852698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3584390463047852698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3584390463047852698'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-rails-and-git-rails-code-to.html' title='[Rails] Re: Rails and Git: Rails code to serve git repositories?'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1214680369497489884</id><published>2009-07-03T09:43:00.001-07:00</published><updated>2009-07-03T09:43:34.650-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Hey,&lt;p&gt;I was running 2.1.0 on my local machine as well but I updated it to &lt;br&gt;2.2.2 but with no effect:&lt;br&gt;ActionView::TemplateError (undefined local variable or method `filename&amp;#39; &lt;br&gt;for #&amp;lt;News:0x40ec017c&amp;gt;) on line #8 of app/views/news/index.html.erb:&lt;br&gt;5:   &amp;lt;/tr&amp;gt;&lt;br&gt;6:   &amp;lt;tr&amp;gt;&lt;br&gt;7:    &amp;lt;td class=&amp;quot;news_table_pic&amp;quot;&amp;gt;&lt;br&gt;8:     &amp;lt;%= image_tag(news.public_filename) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;9:     Erstellt am &amp;lt;%= news.created_at.strftime(&amp;quot;%d.%m.%Y&amp;quot;) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;10:     von &amp;lt;%=h news.author %&amp;gt;&lt;br&gt;11:    &amp;lt;/td&amp;gt;&lt;p&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:260:in &lt;br&gt;`method_missing&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:233:in &lt;br&gt;`thumbnail_name_for&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in &lt;br&gt;`full_filename&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:43:in &lt;br&gt;`public_filename&amp;#39;&lt;br&gt;    app/views/news/index.html.erb:8&lt;br&gt;    app/views/news/index.html.erb:1:in `each&amp;#39;&lt;br&gt;    app/views/news/index.html.erb:1&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/renderable.rb:39:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/template.rb:73:in &lt;br&gt;`render_template&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:256:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:367:in &lt;br&gt;`_render_with_layout&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb:254:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1174:in &lt;br&gt;`render_for_file&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:905:in &lt;br&gt;`render_without_benchmark&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb:8:in &lt;br&gt;`realtime&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:51:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:135:in &lt;br&gt;`custom&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in &lt;br&gt;`call&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:164:in &lt;br&gt;`respond&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in &lt;br&gt;`each&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:158:in &lt;br&gt;`respond&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/mime_responds.rb:107:in &lt;br&gt;`respond_to&amp;#39;&lt;br&gt;    app/controllers/news_controller.rb:22:in `index&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in &lt;br&gt;`perform_action_without_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in &lt;br&gt;`call_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in &lt;br&gt;`perform_action_without_benchmark&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in &lt;br&gt;`perform_action_without_rescue&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in &lt;br&gt;`perform_action_without_rescue&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in &lt;br&gt;`perform_action_without_caching&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in &lt;br&gt;`perform_action&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in &lt;br&gt;`cache&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in &lt;br&gt;`cache&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in &lt;br&gt;`perform_action&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in &lt;br&gt;`process_without_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in &lt;br&gt;`process_without_session_management_support&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in &lt;br&gt;`process&amp;#39;&lt;br&gt;...&lt;p&gt;Any other ideas?&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1214680369497489884?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1214680369497489884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1214680369497489884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1214680369497489884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1214680369497489884'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_5723.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7265208475109927759</id><published>2009-07-03T09:09:00.001-07:00</published><updated>2009-07-03T09:09:38.752-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>I think in your production environment you are using an older version&lt;br&gt;of Rails (review your error trace):&lt;p&gt;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/&lt;p&gt;You should vendor your rails with your application to avoid this in the future.&lt;p&gt;Looks like it&amp;#39;s an incompatibility with the version of attachment_fu&lt;br&gt;and active-record/rails.&lt;p&gt;Cheers,&lt;br&gt;Nicholas&lt;p&gt;On Fri, Jul 3, 2009 at 12:05 PM, Heinz&lt;br&gt;Strunk&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Local Windows machine:&lt;br&gt;&amp;gt; Rails 2.2.2&lt;br&gt;&amp;gt; ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]&lt;br&gt;&amp;gt; gem 1.3.2&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Debian machine (not working on this machine):&lt;br&gt;&amp;gt; Rails 2.2.2&lt;br&gt;&amp;gt; ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux]&lt;br&gt;&amp;gt; gem 1.3.1&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7265208475109927759?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7265208475109927759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7265208475109927759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7265208475109927759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7265208475109927759'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_652.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1507910890672301030</id><published>2009-07-03T09:05:00.000-07:00</published><updated>2009-07-03T09:06:04.528-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Local Windows machine:&lt;br&gt;Rails 2.2.2&lt;br&gt;ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]&lt;br&gt;gem 1.3.2&lt;p&gt;Debian machine (not working on this machine):&lt;br&gt;Rails 2.2.2&lt;br&gt;ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux]&lt;br&gt;gem 1.3.1&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1507910890672301030?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1507910890672301030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1507910890672301030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1507910890672301030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1507910890672301030'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_344.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-3639284588114862639</id><published>2009-07-03T09:00:00.000-07:00</published><updated>2009-07-03T09:01:16.293-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Which version of rails are you developing with locally?&lt;p&gt;On Fri, Jul 3, 2009 at 11:54 AM, Heinz&lt;br&gt;Strunk&amp;lt;&lt;a href="mailto:rails-mailing-list@andreas-s.net"&gt;rails-mailing-list@andreas-s.net&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Yes:&lt;br&gt;&amp;gt; ActionView::TemplateError (undefined local variable or method `filename&amp;#39;&lt;br&gt;&amp;gt; for #&amp;lt;News:0x40f5a7a4&amp;gt;) on line #8 of news/index.html.erb:&lt;br&gt;&amp;gt; 5: &amp;#160; &amp;lt;/tr&amp;gt;&lt;br&gt;&amp;gt; 6: &amp;#160; &amp;lt;tr&amp;gt;&lt;br&gt;&amp;gt; 7: &amp;#160; &amp;#160;&amp;lt;td class=&amp;quot;news_table_pic&amp;quot;&amp;gt;&lt;br&gt;&amp;gt; 8: &amp;#160; &amp;#160; &amp;lt;%= image_tag(news.public_filename) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt; 9: &amp;#160; &amp;#160; Erstellt am &amp;lt;%= news.created_at.strftime(&amp;quot;%d.%m.%Y&amp;quot;) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;&amp;gt; 10: &amp;#160; &amp;#160; von &amp;lt;%=h news.author %&amp;gt;&lt;br&gt;&amp;gt; 11: &amp;#160; &amp;#160;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:in&lt;br&gt;&amp;gt; `method_missing&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:233:in&lt;br&gt;&amp;gt; `thumbnail_name_for&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in&lt;br&gt;&amp;gt; `full_filename&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:43:in&lt;br&gt;&amp;gt; `public_filename&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:8:in&lt;br&gt;&amp;gt; `_run_erb_47app47views47news47index46html46erb&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1:in `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/views/news/index.html.erb:1:in&lt;br&gt;&amp;gt; `_run_erb_47app47views47news47index46html46erb&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in&lt;br&gt;&amp;gt; `execute&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in&lt;br&gt;&amp;gt; `render_template&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in&lt;br&gt;&amp;gt; `render_file&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:in&lt;br&gt;&amp;gt; `render_for_file&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:865:in&lt;br&gt;&amp;gt; `render_with_no_layout&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:880:in&lt;br&gt;&amp;gt; `render_with_no_layout&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:in&lt;br&gt;&amp;gt; `render_without_benchmark&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in&lt;br&gt;&amp;gt; `realtime&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in&lt;br&gt;&amp;gt; `render&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:131:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:131:in&lt;br&gt;&amp;gt; `custom&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:160:in&lt;br&gt;&amp;gt; `call&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:160:in&lt;br&gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:154:in&lt;br&gt;&amp;gt; `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:154:in&lt;br&gt;&amp;gt; `respond&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:107:in&lt;br&gt;&amp;gt; `respond_to&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;app/controllers/news_controller.rb:22:in `index&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in&lt;br&gt;&amp;gt; `perform_action_without_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in&lt;br&gt;&amp;gt; `call_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in&lt;br&gt;&amp;gt; `perform_action_without_benchmark&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in&lt;br&gt;&amp;gt; `perform_action_without_rescue&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in&lt;br&gt;&amp;gt; `perform_action_without_caching&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in&lt;br&gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in&lt;br&gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in&lt;br&gt;&amp;gt; `cache&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in&lt;br&gt;&amp;gt; `perform_action&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in&lt;br&gt;&amp;gt; `send&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in&lt;br&gt;&amp;gt; `process_without_filters&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in&lt;br&gt;&amp;gt; `process_without_session_management_support&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in&lt;br&gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in&lt;br&gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in&lt;br&gt;&amp;gt; `handle_request&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in&lt;br&gt;&amp;gt; `dispatch&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in&lt;br&gt;&amp;gt; `synchronize&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in&lt;br&gt;&amp;gt; `dispatch&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in&lt;br&gt;&amp;gt; `dispatch_cgi&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in&lt;br&gt;&amp;gt; `dispatch&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in&lt;br&gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in&lt;br&gt;&amp;gt; `synchronize&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in&lt;br&gt;&amp;gt; `process&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in&lt;br&gt;&amp;gt; `process_client&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in&lt;br&gt;&amp;gt; `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in&lt;br&gt;&amp;gt; `process_client&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in&lt;br&gt;&amp;gt; `initialize&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in&lt;br&gt;&amp;gt; `new&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in&lt;br&gt;&amp;gt; `initialize&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in&lt;br&gt;&amp;gt; `new&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in&lt;br&gt;&amp;gt; `each&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in&lt;br&gt;&amp;gt; `run&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/bin/mongrel_rails:19:in `load&amp;#39;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;/usr/local/bin/mongrel_rails:19&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Rendering /var/www/web/htdocs/releases/20090612181632/public/500.html&lt;br&gt;&amp;gt; (500 Internal Server Error)&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt;&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-3639284588114862639?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/3639284588114862639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=3639284588114862639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3639284588114862639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/3639284588114862639'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_2984.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-142050990830227750</id><published>2009-07-03T08:54:00.000-07:00</published><updated>2009-07-03T08:55:14.063-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Yes:&lt;br&gt;ActionView::TemplateError (undefined local variable or method `filename&amp;#39; &lt;br&gt;for #&amp;lt;News:0x40f5a7a4&amp;gt;) on line #8 of news/index.html.erb:&lt;br&gt;5:   &amp;lt;/tr&amp;gt;&lt;br&gt;6:   &amp;lt;tr&amp;gt;&lt;br&gt;7:    &amp;lt;td class=&amp;quot;news_table_pic&amp;quot;&amp;gt;&lt;br&gt;8:     &amp;lt;%= image_tag(news.public_filename) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;9:     Erstellt am &amp;lt;%= news.created_at.strftime(&amp;quot;%d.%m.%Y&amp;quot;) %&amp;gt;&amp;lt;br&amp;gt;&lt;br&gt;10:     von &amp;lt;%=h news.author %&amp;gt;&lt;br&gt;11:    &amp;lt;/td&amp;gt;&lt;p&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:in &lt;br&gt;`method_missing&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:233:in &lt;br&gt;`thumbnail_name_for&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:21:in &lt;br&gt;`full_filename&amp;#39;&lt;br&gt;    vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:43:in &lt;br&gt;`public_filename&amp;#39;&lt;br&gt;    app/views/news/index.html.erb:8:in &lt;br&gt;`_run_erb_47app47views47news47index46html46erb&amp;#39;&lt;br&gt;    app/views/news/index.html.erb:1:in `each&amp;#39;&lt;br&gt;    app/views/news/index.html.erb:1:in &lt;br&gt;`_run_erb_47app47views47news47index46html46erb&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in &lt;br&gt;`execute&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in &lt;br&gt;`render_template&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in &lt;br&gt;`render_file&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:in &lt;br&gt;`render_for_file&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:865:in &lt;br&gt;`render_with_no_layout&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:880:in &lt;br&gt;`render_with_no_layout&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:in &lt;br&gt;`render_without_benchmark&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in &lt;br&gt;`realtime&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in &lt;br&gt;`render&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:131:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:131:in &lt;br&gt;`custom&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:160:in &lt;br&gt;`call&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:160:in &lt;br&gt;`respond&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:154:in &lt;br&gt;`each&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:154:in &lt;br&gt;`respond&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/mime_responds.rb:107:in &lt;br&gt;`respond_to&amp;#39;&lt;br&gt;    app/controllers/news_controller.rb:22:in `index&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in &lt;br&gt;`perform_action_without_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in &lt;br&gt;`call_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in &lt;br&gt;`perform_action_without_benchmark&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in &lt;br&gt;`perform_action_without_rescue&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in &lt;br&gt;`perform_action_without_rescue&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in &lt;br&gt;`perform_action_without_caching&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in &lt;br&gt;`perform_action&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in &lt;br&gt;`cache&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in &lt;br&gt;`cache&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in &lt;br&gt;`perform_action&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in &lt;br&gt;`send&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in &lt;br&gt;`process_without_filters&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in &lt;br&gt;`process_without_session_management_support&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in &lt;br&gt;`process&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in &lt;br&gt;`process&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in &lt;br&gt;`handle_request&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in &lt;br&gt;`dispatch&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in &lt;br&gt;`synchronize&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in &lt;br&gt;`dispatch&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in &lt;br&gt;`dispatch_cgi&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in &lt;br&gt;`dispatch&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in &lt;br&gt;`process&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in &lt;br&gt;`synchronize&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in &lt;br&gt;`process&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in &lt;br&gt;`process_client&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in &lt;br&gt;`each&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in &lt;br&gt;`process_client&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in &lt;br&gt;`initialize&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in &lt;br&gt;`new&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in &lt;br&gt;`initialize&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in &lt;br&gt;`new&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in &lt;br&gt;`each&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in &lt;br&gt;`run&amp;#39;&lt;br&gt;    /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281&lt;br&gt;    /usr/local/bin/mongrel_rails:19:in `load&amp;#39;&lt;br&gt;    /usr/local/bin/mongrel_rails:19&lt;p&gt;Rendering /var/www/web/htdocs/releases/20090612181632/public/500.html &lt;br&gt;(500 Internal Server Error)&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-142050990830227750?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/142050990830227750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=142050990830227750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/142050990830227750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/142050990830227750'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_8972.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-1901414063455152257</id><published>2009-07-03T08:47:00.001-07:00</published><updated>2009-07-03T08:47:52.568-07:00</updated><title type='text'>[Rails] JavaScript validation</title><content type='html'>Hi Folks,&lt;p&gt;I&amp;#39;m relatively new to Rails, but am very enamored with it for the most&lt;br&gt;part so far.  I have a contacts page where the User enters his/her&lt;br&gt;personal information. I&amp;#39;m using the server-side validates_presence_of,&lt;br&gt;and downloaded a plugin that allows me to validate_date_time.  I would&lt;br&gt;like to do some javascript client-side validation, and wonder what the&lt;br&gt;ROR approach is to this, as it&amp;#39;s bound to be different (probably much&lt;br&gt;nicer) than what I have done in the past.  I thought this would show up&lt;br&gt;immediately googling, but haven&amp;#39;t found exactly what I was hoping for.&lt;p&gt;Thanks, Rob&lt;br&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-1901414063455152257?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/1901414063455152257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=1901414063455152257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1901414063455152257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/1901414063455152257'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-javascript-validation.html' title='[Rails] JavaScript validation'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-8009470488370992897</id><published>2009-07-03T08:41:00.000-07:00</published><updated>2009-07-03T08:55:29.049-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Putting aside the RMagick issue (can&amp;#39;t really help you there), do you&lt;br&gt;have the full error trace for:&lt;p&gt;ActionView::TemplateError (undefined local variable or method&lt;br&gt;`filename&amp;#39;&lt;br&gt;for #&amp;lt;News:0x41105540&amp;gt;) on line #8 of news/index.html.erb:&lt;p&gt;On Jul 3, 11:26&amp;#160;am, Heinz Strunk &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; Nicholas Henry wrote:&lt;br&gt;&amp;gt; &amp;gt; 1. I wouldn&amp;#39;t have thought the RMagick version would have mattered,&lt;br&gt;&amp;gt; &amp;gt; can you confirm the attachment_fu is being deploy to your production&lt;br&gt;&amp;gt; &amp;gt; environment?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; attachment_fu is inside the plugins folder so should be alright=&amp;gt; 2. Perhaps try upgrading imagemagick first before installing rmagick.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; i updated imagemagick by compiling and installing it manually but now i&lt;br&gt;&amp;gt; get this error message&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Cheers,&lt;br&gt;&amp;gt; &amp;gt; Nicholas&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; On Jul 2, 10:56 am, Heinz Strunk &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-8009470488370992897?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/8009470488370992897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=8009470488370992897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8009470488370992897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/8009470488370992897'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_909.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5338622142565544877.post-7599501682096719925</id><published>2009-07-03T08:26:00.000-07:00</published><updated>2009-07-03T08:27:12.338-07:00</updated><title type='text'>[Rails] Re: Application doesn't work on two different machines</title><content type='html'>Nicholas Henry wrote:&lt;br&gt;&amp;gt; 1. I wouldn&amp;#39;t have thought the RMagick version would have mattered,&lt;br&gt;&amp;gt; can you confirm the attachment_fu is being deploy to your production&lt;br&gt;&amp;gt; environment?&lt;br&gt;attachment_fu is inside the plugins folder so should be alright=&lt;br&gt;&amp;gt; 2. Perhaps try upgrading imagemagick first before installing rmagick.&lt;br&gt;i updated imagemagick by compiling and installing it manually but now i &lt;br&gt;get this error message&lt;br&gt;&amp;gt; Cheers,&lt;br&gt;&amp;gt; Nicholas&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; On Jul 2, 10:56�am, Heinz Strunk &amp;lt;&lt;a href="mailto:rails-mailing-l...@andreas-s.net"&gt;rails-mailing-l...@andreas-s.net&lt;/a&gt;&amp;gt;&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;--~--~---------~--~----~------------~-------~--~----~&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;&lt;br&gt;-~----------~----~----~----~------~----~------~--~---&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5338622142565544877-7599501682096719925?l=green-point-live.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://green-point-live.blogspot.com/feeds/7599501682096719925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5338622142565544877&amp;postID=7599501682096719925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7599501682096719925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5338622142565544877/posts/default/7599501682096719925'/><link rel='alternate' type='text/html' href='http://green-point-live.blogspot.com/2009/07/rails-re-application-doesnt-work-on-two_4872.html' title='[Rails] Re: Application doesn&apos;t work on two different machines'/><author><name>as</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
