Mauro
Mauro

Reputation: 1235

why bundle install rails 0.9.5?

In my Gemfile I have:

gem 'rails'

until yesterday it works well, my rails version was 3.2.9. I've added no new gems and today, after running bundle update I see that it installs rails-0.9.5. Why?

Upvotes: 1

Views: 353

Answers (1)

Peter Brown
Peter Brown

Reputation: 51697

Running bundle update without specifying a gem to update is a bad idea if you haven't set the minor version in your Gemfile. The reason for this is because you will likely upgrade a gem that has a different public interface and it will break your application.

I'd recommend specifying the major and minor version of Rails in your Gemfile so that it "locks" it down so it will only upgrade the patch level:

gem "rails", "~> 3.2.9"

Then when you want to upgrade it, just run:

bundle update rails

This will update Rails to the latest patch (3.2.x) and as long as they are following semantic versioning, you won't have to worry about it breaking your app.

Upvotes: 1

Related Questions