How to live on the (Rails) Edge 16
If you’re relatively new to Rails, you may have heard about the “edge.”
Open source projects usually have what’s called a “trunk” – it’s the latest source code. As opposed to “stable” branches, which are releases that have been declared to be free of any critical bugs and are suitable for general use, the trunk is the actual “tip” of the source tree. The trunk is changing constantly. If you’re familiar with SourceSafe (you are if you’re a Windows developer), getting the trunk is equivalent to doing a “Get Latest” on the current development branch.
Now, good open source projects like Rails try to ensure that even the trunk is pretty stable most of the time. There’s a team of people (called the “core”) that are gatekeepers, and they are the only ones that can actually check code into the trunk.
So on any given day, you can usually use the trunk of the Rails code and be reasonably confident that things will work. But remember, this is still at your own risk. No guarantees are made for code in the trunk, and you only want to ship code that’s using trunk Rails if you’re confident in your tests. But for development, it’s often the way to go to keep up with what’s new in Rails, like all the new CRUD/REST stuff now available in the edge.
Using the trunk source code instead of your stable gems is called using “edge Rails”. And if you want to develop using this version of rails, it’s very easy if you already have a Subversion client installed (like TortoiseSVN).
To switch your Rails app from using gems to edge, just run these two commands from your app’s root directory:
rake rails:freeze:edge rake rails:update
To make sure everything worked, you can now do this:
ruby script\about
And you should see a value for “Edge Version”.
You can re-freeze as often as you want to keep your local “edge” up to date.
Now, if your Rails project is itself under subversion control, then you can have subversion update Rails, too. I’ll cover that in a subsequent article, or in the meantime you can try this Rails wiki page.




Great post for us Windows guys, thanks!
Installing TortoiseSVN doesn't seem to install the actual Subversion executables. I had Tortoise on a computer and tried to freeze and it said I needed to install subversion (couldn't find svn). Maybe I needed to reboot or something for the path to pick it up but I installed the regular Subversion anyway and that took care of it.
Thanks Jason. Perhaps I should have mentioned that TortoiseSVN is just a windows shell extension that depends on the actual subversion client software being first installed. Sorry I didn't make that clear the first time.
What about deployment in a production server? Does your host (for instance Dreamhost) need to have Edge installed as well?
Brad, once you've "frozen" Rails into your project, all of the Rails sourcecode will be put into your app's vendor directory. Then, regardless of what your host has installed, your app will use what you have in vendor. (If nothing is there, only then it will revert to whatever your host has installed).
However, I think it's recommended that you have Ruby 1.8.4 or higher installed, and that's something that Dreamhost has to do (they've probably got it already).
Excellent! I'm starting a new app and I really want to create via REST. I ran a quick search on Dreamhost Wiki and found out that they currently run 1.8.2 however they gave instructions on how to update.
For those that may need this: http://wiki.dreamhost.com/index.php/Ruby
Jeff - I asked Dave T. to include your post in his email reagarding updates to the new version of his book (Agile Web Deve w/ RoR). Thanks for putting this out.
This post offers a couple other ways for dealing with checking out rails, but is written for the mac audience: //www.sitepoint.com/blogs/2006/07/11/installing-and-managing-edge-rails/
I am thinking perhaps a part 2 to this great post? :-)
maybe i am retarded but where do i get this subverision client software you mentioned?? do i even need TortoiseSVN at all since we are using rake to make the actuall pulls..
not very helpful
The actual Subversion client binaries can be found here:
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
No, you don't need TortoiseSVN at all. But it sure makes life easier. It is simply a Windows shell extension that is a front-end GUI for the Subversion client.
I am using Instantversion of rails and running rake rails:freeze:edge gives me below error:
(in E:/InstantRails/rails_apps/cookbook) rake aborted! no such file to load -- E:/InstantRails/rails_apps/cookbook/config/../vendor/rails/railties/lib/initializer E:/InstantRails/rails_apps/cookbook/rakefile:4 (See full trace by running task with --trace)
Please help
Panks,
That means that the E:/InstantRails/rails_apps/cookbook/vendor/rails directory exists but is empty. You can fix this by deleting the directory -OR- to be safer, rename it to something else and then delete after you have successfully executed the rake commands
Thanks, Tom --
I've been beating my head against the wall for a while trying to understand what that error meant.
Hi
Real nice! I found lots of intresting things here. I will bookmark!
Bye
Hi
Hi all!
Only in reflection do we “direct” ourselves to transcendental subjectivity and to its perceptual directedness to experiences.
As we have already seen, our faculties are the clue to the discovery of, in the full sense of these terms, the objects in space and time.