Friday, January 20, 2012

Rails Installation in Windows


I know many beginners feel this topic as painstaking process, as per my familiarity with her (Ruby) she feels more comfortable with Linux than Windows.  She behaves quite differently in Windows and Linux; while dealing with Case Sensitivity, URLs and JSON.

In subsequent posts, I’ll discuss about problems in terms of Case Sensitivity, URLs and JSON and solutions to avoid them.

Before we start with Rails Installation, let me list down the necessary ingredients for this.
  1. Ruby (Be careful with version).
  2. Ruby Gems - is the standard Ruby package manager.
  3. Rails
  4. Sqlite
  5. MySQL - a Database server
  6. MySQL Workbench - an unified visual tool for developers which provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more.
  7. Editor - an IDE for RoR.
So, Lets start with Rails Installation process with our old good looking buddy Windows!

For installing Ruby,Rails and Sqlite we've a easy-to-use installer for Windows called RailsInstaller. By using this you get all the common packages needed for a full Rails stack. so get ready for this!

  1. Go to Railsinstaller and download the latest KIT
  2. Run the installer and follow the installation steps or you can watch the following video so you'll see the simple installation process and how to confirm that Ruby, Rails, Git, etc are all installed properly

RailsInstaller walkthrough, including interacting with Github and the Engine Yard Cloud free trial.



Hey that's great! you've got everything installed. You've written some code. If you have any troubles in Installing, Check the Rails Installer Google Group. 

For MySQL and MySQL Workbench  we've another  wizard-based installer for Windows called MySQL Installer.
  1. Go to MySQL Installer and download latest release
  2. Run the installer and follow the installation steps 
And finally, we need an IDE, for this I prefer Aptana Studio. you can download the latest release here

2 comments:

  1. Good post for beginners, Thanks for this.

    Sir, I am novice to RoR

    Which versions of Ruby, and Rails need to use for initial installation? can it be used with Microsoft SQL server?

    ReplyDelete
    Replies
    1. Yes you can use MS SQL Server with Rails, but you need to configure your DB server in

      Rails App Config File: RAILS_ROOT/config/database.yml

      something like

      development:
      adapter: sqlserver
      mode: ODBC
      username: your_username
      password: your_password
      database: your_db_name
      host: your_server

      And I started with Ruby-1.8.7 and Rails-3.0.9 versions

      Delete