Rails version configuration

Greetings,

Is there a way to configure my rails application so that it will work
with any rails version and not crap out when the hosting company
arbitrarily upgrades to the next version of rails?

My environment.rb file (for a deployed application) contained the
following line:

Specifies gem version of Rails to use when vendor/rails is not present

RAILS_GEM_VERSION = ‘1.2.5’ unless defined? RAILS_GEM_VERSION

This of course results in an application that will not start until the
version number is corrected.

Thanks,

Doug

Yes, there are two ways. Best is if you can freeze your own version
so your hosts can’t kill you with unannounced upgrades. If that is
not an option in your particular configuration then you can comment
out the line in enviroment.rb. If you take option two be aware that
upgrades may break your app in odd ways, so you’ll want to stay on top
of things as new versions come out.

Good Luck,
Rob

Rob K. wrote:

Yes, there are two ways. Best is if you can freeze your own version
so your hosts can’t kill you with unannounced upgrades. If that is
not an option in your particular configuration then you can comment
out the line in enviroment.rb. If you take option two be aware that
upgrades may break your app in odd ways, so you’ll want to stay on top
of things as new versions come out.

Good Luck,
Rob

Thanks Rob. I’ll give it a try.

On Nov 28, 2007 6:19 PM, Doug M. [email protected]
wrote:

Is there a way to configure my rails application so that it will work
with any rails version and not crap out when the hosting company
arbitrarily upgrades to the next version of rails?

Just tell them to never run gem cleanup. There’s no harm in having
97698723893 versions of Rails installed since you control the version
your app uses in your config.rb.


Greg D.
http://destiney.com/