sign in
Home | Updates | Pages | Users | Admin | Help

edgerails

Original document

All credits going to Gorou-san, I’m just a translator

Overview

To work with the latest SVN trunk of Rails you can use
% rake freeze_edge

Lock this application to the Edge Rails (by exporting from Subversion). Defaults to svn HEAD; do ‘rake freeze_edge REVISION=1234’ to lock to a specific revision.

Possible solutions for projects under subverion and others have on EdgeRails wiki page .

Below is described a method to have edge rails install outside of projects directories and symlink their vendor/rails to that install.

Get the latest SVN trunk

% mkdir -p ~/rails/svn
% cd ~/rails/svn
% svn co http://dev.rubyonrails.com/svn/rails/trunk

# directories structure
~/rails/svn/
    trunk/  

Create the directory for the current revision

% cd trunk
% svn info
...
Revision: 3901
...
% cd ~/rails/svn/
% cp -pr trunk 3901p

# dirs
~/rails/svn/
    3901p/
    trunk/

p after revision number is for ‘patches’, which we will apply from now.

zh: Hm, is it possible to do this via hard links, not duplicating all files?

Apply some patches

% cd ~/rails/svn/
% mkdir patches
% cd patches/
% wget -O 4277.diff "http://dev.rubyonrails.org/attachment/ticket/4277/4277.diff?format=txt" 
% cd ../3901
% patch --dry-run -p0 < ../patches/4277.diff
% patch -p0 < ../patches/4277.diff

# dirs
~/rails/svn/
    3901p/
    patches/
       4277.diff
    trunk/

Create some additional links

% cd ~/rails/svn
% ln -s 3901p testing

# dirs
~/rails/svn/
    3901p/
    patches/
    testing@   # --> 3901p
    trunk/

Symlink your projects

% cd ~/rails/apps/sample/vendor/
% ln -s ~/rails/svn/testing rails

Testing/Stable revisions

Start testing your application. If everything is OK, you can mark the current revision as stable:

% cd ~/rails/svn/
% rm stable && ln -s 3901p stable

# dirs
~/rails/svn/
    3901p/
    stable@    # --> 3901p
    testing@   # --> 3901p
    trunk/
% cd ~/rails/apps/sample/vendor/
% rm rails && ln -s ~/rails/svn/stable rails

# dirs
~/rails/apps/sample/vendor/
    plugins/
    rails@     # --> ~/rails/svn/stable
After some time your rails directory will be something like:
~/rails/svn/
|-- 3901p/
|-- 3903p/
|-- 4000p/
|-- patches/
|-- stable@      # -> 3901p
|-- testing@     # -> 4000p
`-- trunk/
zh: after each revision change, maybe updating project files is needed:
% cd ~/rails/apps/sample
% rails .
% rake rails:update

Switching from gem_rails to edge_rails

% rails edge
% cd edge
% ln -s ~/rails/svn/stable vendor/rails
# Overwrite some files
% ruby ./vendor/rails/railties/bin/rails .
% script/about
...
Edge Rails revision          4552
...

Powered by JunebugWiki v0.0.31 Page last edited by stoyan on December 15, 2006 05:42 PM (diff)
[readonly] Version 2 (current) «olderversions