Firstly, I needed to get Ruby 1.8.4 compiled to upgrade my 1.8.3 release, as well as compile in support for Readline (since I posted about a problem I’d had with Rails’ console earlier without this):
cd ~/wget ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gzwget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.4.tar.gztar zxvf ruby-1.8.4.tar.gztar zxvf readline-5.1.tar.gz
cd readline-5.1./configure --prefix=/usr/localmakesudo make install
cd ../ruby-1.8.4.tar.gz./configure --prefix=/usr/local --enable-pthread\ --with-readline-dir=/usr/localmakesudo make install
That should update your version of Ruby, you can check all went well by running `ruby -v` and checking you see: `ruby 1.8.4 (2005-12-24) [i686-linux]`.
The next step was to get my server up and running with the latest code from Typo’s trunk (and place Rails 1.1 in the vendor directory—I wanted to leave my other applications on 1.0 for the time being).
To do that, I created a separate directory at the same level as my current Typo revision. Within the directory I also have a symlink named `current` that points to the revision I’m currently running from.
So, I ran the following:
cd /var/www/servers/www.oobaloo.co.ukmkdir trunkcd trunksvn co svn://typosphere.org/typo/trunk .
That should pull down the latest revision, I also then renamed the directory to indicate the revision that it corresponds to:
Next, we need to place the Rails 1.1 release inside the Typo application’s `vendor` directory. This is apparently what is likely to be bundled into future Rails releases: everytime you create a new application via `rails myapp` it’ll copy the Rails source over for you.
So, I do the following (inside the `trunk-983` directory):
cd vendormkdir railscd railssvn co http://dev.rubyonrails.org/svn/rails/tags/rel_1-1-0/ .
Again, you’ll see a flash of info from Subversion letting you know it’s all been downloaded successfully.
Finally, I wanted to do the necessary database migrations so that my database schema is up-to-date. To make sure I didn’t lose anything I used `mysqldump` to backup the database beforehand (into a `db` folder I use for all my backups).
cd ../../dbmysqldump typo_production -u typo -p > typo-pre-983.sql
Check that the file was created with all the content, and then you can make the final step (running the Rails migration):
cd trunk-983rake migrate RAILS_ENV=production
You should hopefully see the migration stuff succeed, finally, you can switch the `current` symlink over:
rm currentln -s trunk-983/ current
And you’re off and running!