Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a Rails 2.3.8 app on my server, with other depended gems, which usually require old version instead of the new version which supports Rails 3.

I have not been running apt-get update and apt-get upgrade on my VPS. I am afraid that running either may upgrade my Rails and other gems to latest version, which will then break my app.

I just wanna update my Ubuntu system, such as security updates and such, without touching any applications.

So, what should I run?

Thanks.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

If anything breaks on your system as a result of installing security updates (which is correctly done with apt-get upgrade), then in general it would be a bug in the upgraded package.

Of course, this is assuming that you're not doing oddball things like mixing distribution releases, or using third-party repositories -- in that case, all bets are off and you're totally on your own. So don't do that.

share|improve this answer
    
So now which line I should run? –  Victor Jul 30 '11 at 16:02
1  
Did you even read my answer? –  womble Jul 30 '11 at 16:03

If you want to ensure that your gems don't upgrade during the server update/upgrade, you can add the specific gem version to your environment.rb file.

As an example; rather than just declaring the gem name you can add the version number:

config.gem 'delayed_job', :version => '~>2.0.4'

The above line will ensure the delayed_job gem is installed but only the specific version of 2.0.4.

I notice you said that you don't want to touch the applications. I don't think you can achieve a server-wide update without first manually adding the gem version numbers as I explained above.

Once you have added the version numbers you should be able to run both 'apt-get update' and 'apt-get upgrade' without fear that your applications would break. AFAIK when you update/upgrade the server it will install the newest version of RoR but it won't remove version 2.3.8.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.