Backwards compatibility

does any one know how revert between rails versions without rewriting
lots of code, i.e. backwards compatibility, isnt there a framework that
handles the changes so your applications will work>?

I’ve never seen something like that but why would you ever want to
“revert” your code to work on a previous version?

The only possible solution is to add a lot of “ifs” to every single
thing that changed.

Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr

On Mon, Aug 24, 2009 at 10:29 PM, Arthur

In short, no.

In longer, why on EARTH would you want to run on an older version?
You’re asking for trouble.

–Matt JOnes

On Aug 24, 9:29 pm, Arthur R. [email protected]

Well, i havent the need to go backwards, but testing out xlsuite I have
tried to get it running with the code from git and the bundled rails
wasnt working well. I ran on Debian, rails 2.3.3,ruby 1.8.7 and xl is
on 2.2.2 but I couldnt get it working so hence the reason to ask. I did
remove the newer version and installed 2.2.2 to get it to work but it
was complaining about encoding issues…

maybe it wasnt the best idea but a lazy thought…

thanks, not really the situ for this case - but good advice for future

2009/8/25 Arthur R. [email protected]:

Well, i havent the need to go backwards, but testing out xlsuite I have
tried to get it running with the code from git and the bundled rails
wasnt working well. Â I ran on Debian, rails 2.3.3,ruby 1.8.7 and xl is
on 2.2.2 but I couldnt get it working so hence the reason to ask. Â I did
remove the newer version and installed 2.2.2 to get it to work but it
was complaining about encoding issues…

You don’t need to remove a later version of Rails to use an earlier
version, just setup the version you want in environment.rb, for
example
RAILS_GEM_VERSION = ‘2.3.2’ unless defined? RAILS_GEM_VERSION

If you want to freeze that version into your app then you can do
rake VERSION=2.3.2 rails:freeze:gems

Colin

On Mon, Aug 24, 2009 at 8:29 PM, Arthur
Rats[email protected] wrote:

does any one know how revert between rails versions without rewriting
lots of code, i.e. backwards compatibility, isnt there a framework that
handles the changes so your applications will work>?

The tool you want is you. You write tests for you app then when you
move forward into a new Rails version you run your tests and fix the
issues, pretty simple actually.


Greg D.
http://destiney.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs