Jim Jones
Jim Jones

Reputation: 2837

How to get a rails commit into my gemmed version

Rails 2.3 was released last week and I installed it with gem install rails. Everything is working fine. However, I noticed a bug, so I searched a bit and sure enough a new commit was accepted 2 days ago that fixes the same bug I saw.

How can I get these latest changes into my version of rails that I'm running locally?

I tried gem update rails --include-dependencies but it doesn't update rails (as I assume because I already have the latest gem 2.3.2). So, how can I get the last few commits into my version of rails?

Thanks.

Upvotes: 2

Views: 167

Answers (4)

nitecoder
nitecoder

Reputation: 5486

If you freeze rails to the 2.3.2 version, you can then edit the file yourself and be sure that your application will use that edited version of rails.

Upvotes: 0

DGM
DGM

Reputation: 26979

If you use git to checkout the release, then you can use git cherry-pick to grab the specific patches that you want for your own personal tree. google for git cherry-pick for more info (and if you aren't familiar with git, it's worth learning!)

Upvotes: 1

Adam Alexander
Adam Alexander

Reputation: 15180

I found some comprehensive instructions for this here:

http://www.napcsweb.com/blog/2008/04/24/create-a-new-edge-rails-project

Upvotes: 0

Ghoti
Ghoti

Reputation: 2380

I've never used Edge Rails but I imagine that's what you'd need to do. Edge is the last commit and may have other bugs in it.

If the changes are small, just edit the code. Once you've done that you may be able to freeze the gems after you've edited them, but I'm not sure that freeze will freeze the rails code itself. If it does then everything should still work fine, otherwise you'd also need to edit it on your production gems too.

Hope this helps, doubtless some Rails Edge god will come along and tell us the easy way.

Upvotes: 1

Related Questions