work with both rails version 1.2.3 and 2.0

currently i am working with rails 1.2.3 version. i am using windows xp os on my machine. i want to work with rails 1.2.3 and 2.0 both.

but when i install 2.0 on my machine. The older application which is created in 1.2.3 version gives me error. Is there any way to work on both version without having errors.

There should be a line at top of your config/environment.rb that specifies the rails gem version. You need something like this:

RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION

Older versions of rails used to generate a line that would use the largest rails version present. That's probably what your 1.2.3 is doing.

Aaron

You need to freeze the correct rails version into each project. freeze is a fancy way of saying "copy the exact version of rails directly into my project". If you do not freeze, the system will grab the most current version and use it. When you freeze, rake will create a directory named "rails" in your project's vendor directory and copy the appropriate version of rails into that dir and then always use it. The command is: rake rails:freeze:edge TAG=rel_1-2-3 and rake rails:freeze:edge TAG=rel_2-0-2

Good luck

currently i am working with rails 1.2.3 version. i am using windows xp os on my machine. i want to work with rails 1.2.3 and 2.0 both.

but when i install 2.0 on my machine. The older application which is created in 1.2.3 version gives me error. Is there any way to work on both version without having errors.

First off, do what Aaron says. Then squash any deprecation warnings (there are some things that were deprecated in 1.2.x that were removed in 2.0) and install any plugins for functionality extracted from core (acts_as_list, acts_as_tree, pagination etc...). If it's still not working then you'll have to be more specific about what errors.

Fred