Living on the Edge

As I hinted at in a comment to my last blog post, release candidate 1 for Rails 2.0 has just been released with a number of improvements and bug fixes and in preparation for the final release it is recommended that anyone that is using the pre-release upgrades there applications – but how can you do that? Well it is much easier than you think, and you can be selective about which applications get the makeover.

Although you can reference the Rails libraries in a common path via gems, you can also install specific versions on an per-site basis. Rails will automatically look for a rails folder in the vendor directory – if it finds it, it will use that.

Freezing Rails

Probably the easiest way is to use the freeze rake task. Running the following in the root directory of you application should do the trick:


rake rails:freeze:edge TAG=rel_2-0-0_RC1

Piston

If you are more adventurous and want to play with the bleeding edge, you can use Piston to help you manage all of your rails plugins (including the core!). Now if you are a good little developer you should be using some sort of version control repository, my personal choice is subversion (SVN). This just so happens to be the choice for the Rails core team as well as many (if not most) Rails plugin developers.

But what happens if you want to version your application, and easily keep up to date with the updates on your favourite plugin? Well, in the past you would have used the svn:external property, which allowed you to keep multiple code trees with in the same repository. Sure it’s easy enough to do, but why not make it even easier? Enter Piston.

The Piston page better explains how it all works and how to set it up, so I’ll leave it up to you to read through, but to check out the edge version of Rails, all you need to do is:


piston import http://dev.rubyonrails.org/svn/rails/trunk vendor/rails

Then just run


piston update vendor/rails

to update it!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.