views:

106

answers:

4

Hi,

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.

+1  A: 

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.

Ghoti
A: 

I found some comprehensive instructions for this here:

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

Adam Alexander
Thanks, very helpful. Is there a way to include a specific commit or range of commits?
Jim Jones
Sure, from the instructions in the article I linked, be sure to remove the line after the git-clone which deletes /vendor/rails/.git*This will leave your git repository intact after which you can cd to vendor/rails and run git checkout <sha>(replace <sha> with the sha hash of the desired commit)
Adam Alexander
Just to expand on that, 'git checkout <sha>' will give you the commit you specify including any commits which came before it. So for a range of commits just specify the final commit from the range you want.
Adam Alexander
+1  A: 

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!)

DGM
A: 

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.

railsninja