From Zero to Rails in 10 Steps (Windows)

March 12, 2007

Ok, so I know that there are other “getting started with rails” tutorials out there, but I thought I’d take a stab at it. I’m doing this from the “teach a 2 year old” point of view, so I’ll try to walk you through everything. And I’ll try to do it in 10 steps. Now, if you don’t know what Rails is, check out the rails website. Also, there is a solution out there called InstantRails for windows that will allow you to install rails from a single application. However, following the steps below will give you much greater flexibility in the future and you might actually learn something along the way! The goal is to end up with a rails development environment on your Windows box including ruby, rails, mysql (your database) and mogrel (your development web server). Don’t worry if you don’t know what these things are, just follow along. Here we go!

1. Download and install the ruby one-click installer.
2. Go to Start -> Run, type “cmd”. At the command line, type the following: gem update – -system (no space between the dashes, just for clarity’s sake).
3. Still at the command line, type: gem install rails – -include-dependencies (again, no spaces)
4. Again, at the command line type: gem install mongrel – -include-dependencies (do I have to say it again? no spaces)
5. Download and install MySql Server 5.0. Pick any mirror. Uncheck the option for changing the root password during the install. Make sure you check the option to run the service when you finish the installation.
6. Download and install HeidiSQL. This will let you view your MySQL database through a graphical user interface.
7. Create a database for our application. Start HeidiSQL, create a new connection, accept ALL the defaults (no password or anything else) and click connect. Create a new schema (right click on the left hand pane) named: myrailsapp_development. Exit the program.
8. Create your rails application. Go to Start -> Run. Type “cmd” and hit enter. At the command line, type: rails myrailsapp. Now, type: cd myrailsapp. You now have a new rails app and you are inside the directory!
9. Still at the command line type: ruby script/server. Your mongrel server is running!
10. Open up your internet browser and into the address bar type: http://localhost:3000. You’re rolling with rails! Yahoo!

Hope that all worked out for you! For more information, check out the rails website. There are also a ton of getting started tutorials out there and the rails site should point you to a lot of them. Good luck, and enjoy rails!


2 Responses to “From Zero to Rails in 10 Steps (Windows)”

  1. JoeB Says:

    This seems easy enough. Ill have a go this weekend. I gotta figure out how to get my ideas to actually exist on the web instead of just in my head. Its time to learn!

  2. drewolson Says:

    Thanks for the comment. I’m planning on adding another 10 step plan for getting rails up and running on OS X as well and then following that up with some simple tutorials. Let me know how the setup works for you and if I need to make any changes to my steps.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: