May 2005 26

Tracks on Windows XP tutorial

John Leonard has written up a fantastic tutorial for getting Tracks running on Windows XP, including using a package called Uniform Server which provides a web server and MySQL among other things. There’s also a full video tutorial with notes to make the whole process crystal clear.

Yay John! I love it when users help other users out.

Updated 25/10/2005 to link to John’s new and updated version of the tutorial that works with Tracks 1.03.

14 Comments

Please send me free windows XP manual.

John’s tutorial is great, but in my opinion it’s a little overkill.  I’ve written a tutorial that uses just MySQL, Ruby, and Rails to get Tracks working.  No extra webserver neccesary.  Although I’m not much of a tutorial writer, I figure it came out clear enough.

Now if I could just find a way to get rid of the pesky command prompt window.

Thanks for the great software!

-Eric

Eric, thanks for that—it’s always good to have a variety of methods.

I really wish that someone would make a movie like that for the Mac. I know that it’s supposed to be ridiculously easy for Macs and Linux. I guess that makes me an idiot. I just can’t get Tracks to work. Even sadder, I’m hosting with a server that serves up Ruby on Rails… and I’ve tried getting Tracks up and running any way I can (on my Mac, and the server) and am just missing basic concepts that I guess others just have, locked down. It’s really cutting into my Battlestar Galactica watching time… does anyone have any os x (Tiger) tips for a new-new-newbie?

Matt Bivins: Have you tried Locomotive? It’s a ‘one-click’ installation of all of the components you need for running Rails apps on Mac OS X, and once you’ve got that installed, I should be able to talk you through the rest of it if you can give me a few more details about where you’ve been going wrong.

bsag: Thanks very much! I spent an hour or so in the command line following the Hivelogic narrative on the os X installation page (in the wiki). Things seemed to go fairly smoothly… I think that the problems started when I tried to actually install Tracks. I now should have Ruby, Rails, a mySQL server, and some other goodies available to me on my iMac; I just get flummoxed by the “rail migrate” business, and setting up the databases. I’d appreciate any other help, for sure! Thanks in advance.

I’m having the same problems at Matt. I downloaded Locomotive, and tried to run my install, but it won’t run. Before trying locomotive, I can populate the sqlite3 database and had a gems install of sqlite3 working. However, whenever I try to start Webrick, it runs then stops.

Matt Bivins: OK. Well if you follow the instructions in installation.html very carefully, you should be OK. But what you need to do is to unzip the tracks package somewhere convenient. I suggest /Users/yourusername/Sites/tracks (I’ll shorten this to ~/Sites/tracks from now on). Then you need to copy the template files: copy log.tmpl to log (so that the folder log contains apache.log, development.log, production.log and test log), copy config/database.yml.tmpl to config/database.yml and config/environment.rb.tmpl to config/environment.rb.

Then you need to open up database.yml and fill in the details of your MySQL database name (you need to create one first and call it, for example, tracks-1041), MySQL username and password. Fill in the same details for the development and production sections and leave the test section blank. In normal use, we’ll be running Tracks under production mode, so only the production details will be needed, but to set it up we’ll need development mode.

Now, open up the Terminal application (it’s in Application/Utilities/Terminal). Type:

cd ~/Sites/tracks; rake migrate

If that generates some obscure error, delete the MySQL database you created and create a fresh one. Then type:

rake db_schema_import

Check the database to make sure that it has some tables set up inside it. If so, all should be well. You should be able to start the server up with Locomotive using the control panel, and from there you need to visit the signup page (http://yoururl/signup) to make some users.

Ted: If you have sqlite3 working, then just use the sqlite database I provided (db/tracks-104.db). There’s then no need to run rake migrate. Just make sure that you’ve put the correct full path to the database in the database: line of database.yml.

Hope that helps!

Eric, you can run WEBrick without the command-line popping up by using this (I put it in a batch file):

rubyw script/server -e production

(Or whichever setting for WEBrick you’re using.)

The command window will pop up for a bit. Let it run, and it will close out, but the rubyw process of the running WEBrick instance will stay (you can kill it from your process list, or, you could use another batch file using taskkill.exe).

~stipes

incase you’re behind a firewall like i was, see the “if all else fails” section on here http://wiki.rubyonrails.com/rails/pages/GemRails/versions/21

After a while, Uniform Server 3.4 is about to be released. Release date is set for around April 1-4, 2007. It should be an easy upgrade…. Please copying over is not really the best option, just copy over your files to the new install and your settings…. for mysql, copy the database from /usr/local/mysql/data/ without having to go to phpMyAdmin…..

If anyone needs help, you can use our forums at http://www.uniformserver.com

Thanks.

Before I get started with this, can anyone tell me if I’ll be able to install Tracks behind my companies firewall, with a “locked” down corporate PC (Windows XP)?
Thanks.

Great tutorial! Thanks for posting definately taught me alot about XP!

It is good that someone writes articles which really matters something. Thank you for this article, it�s full of knowledge which is hard to find in tons of rubbish in our famous world wide web. Regards and good luck!

Name:

Email (not shown on page):

Location (optional):

URL:

Remember my personal information

Notify me of follow-up comments?

Please enter the word you see in the image below: