I’ve been reading a lot about Ruby on Rails, because being a committer on one of the most important Java web frameworks (WebWork) made me curious about it. But this post is not another RoR vs Java web framework post. (by the way, WebWork has already some productivity improvements and more work is on the way on the SAF2 (Struts Action Framework) side)
Today, I’ve had finally time to install RoR on my laptop in an attempt to see it at work. I was looking for an installer that would make things very simple, and indeed the guys on Ruby community made it available in the form of InstantRails. A zip file, containing absolutely everything you need to start playing with RoR and immediately see your toys. Excellent decission!
However, I’ve been a little bit intrigued by the fact that the zip file already contains a Ruby distribution (1.8.4) and also MySQL, both of which I have already installed. So I have tried to make it use the existing parts I had instead of its own copies. As advertised, RoR is about convention over configuration, so I couldn’t figure out how to do this without some tricks [smile/].
The tricks are quite simple:
- copy all RoR related gems to your default Ruby installation
- copy all SCGI and Mongrel scripts to your default Ruby installation dir
- delete the
rubydirectory in InstantRails installation and use the excellent tool junction to create a link fromrubyto your Ruby installation dir - use
mysqldumputility to dump the example dbs in InstantRails - create these DBs in your MySQL
- delete the
mysqldirectory in InstantRails installation and use again junction to create a link frommysqlto your MySQL installation dir
After doing this you have an installation of InstantRails that uses your existing Ruby and respectively MySQL installation.
I am posting this because I couldn’t find any hints on achieving it on InstantRails mailing list archieves and I guess there may be other people trying to do it.
category: Ruby, Ruby on Rails, RoR, InstantRails, MySQL

3 Comments
September 21, 2006 at 3:37 am
I guess I am overlooking something very simple here but I can’t create the junction. Can you post a quick sample of what you typed in the prompt to get junction to create the “junction” on the MySQL part?
I have done:
junction C:\InstantRails\mysql C:\Program Files\MySQL\MySQL Server 5.0
but that doesn’t seem to work. What am I doing wrong?
September 21, 2006 at 5:21 pm
I think the problem might be that the target folder path has spaces. I guess you should double quote it, as in junction mylink “C:\Program Files\”
./alex
–
.w( the_mindstorm )p.
May 31, 2007 at 2:29 am
I was in the same situation. These instructions helped me use existing MySQL. Now I will try the same with Apache! Thanks!