[Rails] Re: upgrade to Rails 2

2009-03-07 Thread Phlip
Colin Law wrote: > An alternative strategy that has worked for us is to do the mods for the > Rails upgrade on a branch. Merging in changes from the current > master/trunk is then the equivalent of your integrate phase as it picks > up mods done by other team members on the master. Only rare

[Rails] Re: upgrade to Rails 2

2009-03-07 Thread Colin Law
2009/3/7 Phlip > > > > In a recent upgrade I had to change > > the base class for my unit tests from Test::Unit::TestCase to > > ActionController::TestCase which I imagine would not have worked had I > > reverted. Are there not other cases of code that cannot be made to work > > in old and new

[Rails] Re: upgrade to Rails 2

2009-03-07 Thread Phlip
Colin Law wrote: > Do you mean you require that the code runs on the old and new versions > of rails? Is this always possible? No. When the Rails maintainers took the default paginator out, and moved it into a plugin, they very wisely (not!) decided to upgrade it at the same time. We have

[Rails] Re: upgrade to Rails 2

2009-03-07 Thread Colin Law
2009/3/7 Phlip > > > I did it to several programs like this: > > - edit environment.rb and upgrade the version > > - rake rails:update > > - run all the tests > > - fix one warning or error > > - revert everything in config (leave the new JS) > > I don't understa

[Rails] Re: upgrade to Rails 2

2009-03-06 Thread Phlip
> I did it to several programs like this: > - edit environment.rb and upgrade the version > - rake rails:update > - run all the tests > - fix one warning or error > - revert everything in config (leave the new JS) I don't understand what is meant here. Do you mea

[Rails] Re: upgrade to Rails 2

2009-03-06 Thread anrake
I found this Peepcode pdf book to be quite valuable. it goes over some of the deprecations and cool new features for people already familiar with Rails 1. https://peepcode.com/products/rails-2-pdf On Mar 5, 1:15 am, Colin Law wrote: > 2009/3/4 Conrad Taylor > > > > > On Wed, Mar 4, 2009 at 5:

[Rails] Re: upgrade to Rails 2

2009-03-04 Thread Colin Law
2009/3/4 Conrad Taylor > On Wed, Mar 4, 2009 at 5:59 AM, Colin Law wrote: > >> 2009/3/3 Phlip >> >>> >>> anrake wrote: >>> > Hi, I'm a little bit behind the curve I guess. I need to upgrade my >>> > app from Rails 1.2.6 to the most recent version 2.2.2. Are there any >>> > complete guides (i

[Rails] Re: upgrade to Rails 2

2009-03-04 Thread Conrad Taylor
On Wed, Mar 4, 2009 at 5:59 AM, Colin Law wrote: > 2009/3/3 Phlip > >> >> anrake wrote: >> > Hi, I'm a little bit behind the curve I guess. I need to upgrade my >> > app from Rails 1.2.6 to the most recent version 2.2.2. Are there any >> > complete guides (including Peepcodes or Pragmatic pdf

[Rails] Re: upgrade to Rails 2

2009-03-04 Thread Colin Law
2009/3/3 Phlip > > anrake wrote: > > Hi, I'm a little bit behind the curve I guess. I need to upgrade my > > app from Rails 1.2.6 to the most recent version 2.2.2. Are there any > > complete guides (including Peepcodes or Pragmatic pdf books) that give > > you a comprehensive guide on how to u

[Rails] Re: upgrade to Rails 2

2009-03-04 Thread anrake
Thanks guys. I guess I'm not missing any quick & easy guides then. Will slowly plug away... On Mar 4, 12:38 am, Phlip wrote: > anrake wrote: > > Hi,  I'm a little bit behind the curve I guess.  I need to upgrade my > > app from Rails 1.2.6 to the most recent version 2.2.2.  Are there any > > co

[Rails] Re: upgrade to Rails 2

2009-03-03 Thread Phlip
anrake wrote: > Hi, I'm a little bit behind the curve I guess. I need to upgrade my > app from Rails 1.2.6 to the most recent version 2.2.2. Are there any > complete guides (including Peepcodes or Pragmatic pdf books) that give > you a comprehensive guide on how to upgrade your application? I

[Rails] Re: upgrade to Rails 2

2009-03-03 Thread Conrad Taylor
On Tue, Mar 3, 2009 at 6:57 AM, anrake wrote: > > Hi, I'm a little bit behind the curve I guess. I need to upgrade my > app from Rails 1.2.6 to the most recent version 2.2.2. Are there any > complete guides (including Peepcodes or Pragmatic pdf books) that give > you a comprehensive guide on h

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread Frederick Cheung
On 23 Dec 2008, at 16:43, lee.longm...@googlemail.com wrote: > > Fred, > > I do have a "changed" method! > ># ># Typically used by "set" accessors to indicate that an attribute > of this object has been changed. ># >def changed >@has_changed = true >end > > Why would

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread lee.longm...@googlemail.com
Fred, I do have a "changed" method! # # Typically used by "set" accessors to indicate that an attribute of this object has been changed. # def changed @has_changed = true end Why would this cause a problem? On 23 Dec, 16:37, "lee.longm...@googlemail.com" wrote: > F

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread lee.longm...@googlemail.com
Fred, I'll look for "changed". I can re-create the error in the console - please see below. The error would suggest that attribute_names in attributes_with_quotes is set to true though as you can see the 'attributes.keys' for the instance being saved seems ok. *** CONSOLE OUTPUT - r, an existin

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread Frederick Cheung
On 23 Dec 2008, at 15:44, lee.longm...@googlemail.com wrote: > > > I'm not sure which model is causing the problem. I am now trapping It would be the model being saved/created. A method called changed would cause a problem for example. Fred > > exceptions and the error first occurs when I e

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread lee.longm...@googlemail.com
I'm not sure which model is causing the problem. I am now trapping exceptions and the error first occurs when I execute root.save (see ***1***). 'root' is an instance of my Property model. I also get the same error when executing code *** 2 *** (which follows the execution of *** 1 ***) - member.

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread Frederick Cheung
On 23 Dec 2008, at 14:04, lee.longm...@googlemail.com wrote: > > I have checked for method/association name clashes and can't see any. > Any tips on how I might debug this further would be very much > appreciated - I am completely stuck! You could start by showing the code in your model. If you

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-23 Thread lee.longm...@googlemail.com
I have checked for method/association name clashes and can't see any. Any tips on how I might debug this further would be very much appreciated - I am completely stuck! To recap, I am getting the error "undefined method `each' for true:TrueClass" when an Active Record method (in active_record/bas

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-20 Thread Frederick Cheung
On Dec 20, 1:52 pm, "lee.longm...@googlemail.com" wrote: > To add, I am seeing the following when I retrieve an existing Root > object in the Rails console and then try to save it again: > My guess would be that you have a method or an association with a name that has since been used internally

[Rails] Re: Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)

2008-12-20 Thread lee.longm...@googlemail.com
To add, I am seeing the following when I retrieve an existing Root object in the Rails console and then try to save it again: => # >> root.save NoMethodError: undefined method `each' for true:TrueClass from /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:2808:in