How to get the latest typo running in InstantRails
April 14th, 2006
Wow! I feel like I've accomplished stuff tonight. First, let me say that the documentation for just about everything Ruby on Rails leaves a LOT to be desired. I'm hoping someone comes along eventually and fills in all of the holes. Of course, with there being SO many different ways to do things, documenting all of them won't be easy.
Now, let me see if I can document all of the steps I went through to get the latest version of Typo running in my dev environment. First, how did I get the latest version? Here's the page where I got started. In order to get the latest copy of typo, you need to type "svn checkout svn://typosphere.org/typo/trunk typo" from the command line.
Uh oh. No svn. So, I consulted the mighty Google Oracle and visited the svn page. Of interest there is the downloads page . Way down towards the bottom, where the Windows packages have been relegated, this caught my eye: "If you want a pretty Win32 GUI, TortoiseSVN integrates nicely with the Windows Explorer."
So, I downloaded and installed TortoiseSVN. It's pretty darned cool. Here's what I did (after doing the required reboot for TortoiseSVN): I created a new directory called "typo" under the c:\InstantRails\rails_apps directory. In Windows Explorer, I right-clicked on the typo directory, and chose "SVN Checkout:"
So, I opened up the InstantRails app. (I'm assuming you have this and you've played with it a little bit, go through the menus, there's not too many.) Through InstantRails I open phpMyAdmin and created new databases called new_typo and new_typo_dev (there's another database in there called typo already for the old typo installation). I also created a user called new_typo and granted it all priviledges. I'm not sure if I needed to do that or not, but I couldn't run the schema update without that.
On this page, there's instructions for how to dump the schema into my new database. Go to the C:\InstantRails\rails_apps\typo\db and type
mysql -u new_typo –p new_typo and hit enter. You'll be prompted for the password you created for the new_typo user you just created. Now do the same thing, but change the second new_typo to new_typo_dev to load the schema into the dev environment. The linked page has instructions for turning on the production version of your typo blog, but since I'm fooling with development, I left it alone.Now, go back to the InstantRails app and go into the Manage Rails Applications dialog. Click the checkbox for the typo app and press the button to start the WEBBRICK server. Open your browser and visit http://localhost:3000/ and you should be in business!! Note: Don't try http://localhost:3000/typo because that won't work - that confused me for a good 10 minutes or so!
I hope someone finds this tutorial useful. I sure would have been happy if I'd found it before I tried all of this. Good luck and leave me a comment if you liked my tutorial or if you have questions. I can't promise that I can answer everything, but I'll try!
June 10th, 2007 at 07:21 PM very thanks!
June 10th, 2007 at 07:21 PM great tutorial, but i seem to have a problem when it comes to connecting to the database. It is set properly, it just doesn't work look for yourself! www.opentune.uni.cc:3000
July 11th, 2007 at 03:30 PM
Hi TDonaghe, Everything worked fine until when I clicked Start with Mongrel. It shows an error instead of “Mongrel ready at 127.0.0.1:3000” and it goes away so fast that I cant even see what it says.
Any ideas?
July 11th, 2007 at 08:51 PM
Hi Azad. Unfortunately, since writing this article I’ve moved all of my development onto a mac. I currently don’t have an environment to look at this issue for you. Without the error message, I don’t really have a clue.