Aug
29
2011

Installing Ruby on Rails 3 on Windows

This post helps you Installing ruby on rails 3, on windows platform. So without wasting your time, here we go.

  1. Download the latest stable release of ruby. ( In our case we are taking Ruby 1.9.3 & Rails 3 )
  2. Install it like any other program you do.
  3. Open command prompt & navigate to ruby > in directory & run following command to check version
    > ruby –version
    it should output something like this
    ruby 1.9.2p290 (2011-07-09) [i386-mingw32]Now run following to update ruby & then installing gemcutter
    > gem update –system
    > gem sources -a http://gemcutter.org

    Now time to install Rails. Run following command.
    > gem install rails
    after installation, it will show a message ‘Successfully installed rails-3.0 ‘

    you can check the rails version by following command
    > rails –v

    Now, lets create your first application after that we can test it in browser. To create a new application run this command.
    > rails new yourappname
    this will create all directories needed by your application & will setup all configuration files as well. Under bin directory (where you are right now), you can see a new folder with yourappname

    Now, navigate to that app folder just created and run following command.
    > bundle install

    Now the final step. Starting the rails server
    > rails server
    when you run this command. It will show some output like this.
    => Booting WEBrick
    => Rails 3.0.10 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2011-08-29 08:56:17] INFO WEBrick 1.3.1
    [2011-08-29 08:56:17] INFO ruby 1.9.2 (2011-07-09) [i386-mingw32]
    [2011-08-29 08:56:17] INFO WEBrick::HTTPServer#start: pid=4000 port=3000

    Now to test your server running, open this in your browser.
    http://localhost:3000/



    DS.’home’.DS.’mycake

    About the Author: