Sunday, November 10, 2013

How to install Ruby on Rails offline in Windows 7 and use WEBrick as web server

When online
  1. Download railsinstaller-2.2.1.exe from http://railsinstaller.org/
  2. Download uglifier-2.2.1.gem from http://rubygems.org/gems/uglifier

When offline (on another computer)
  1. Execute railsinstaller-2.2.1.exe
  2. Open command window
  3. Using the command window, navigate to the directory where uglifier-2.2.1.gem is saved
                                 cd <path where uglifier-2.2.1.gem is saved>
  1. Type the following command:
                                gem install --local uglifier-2.2.1.gem
  1. Create your Rails site with the following command:
                                rails new <name of your site>
  1. Using the command window, navigate to the directory of your site:
                                cd <path of your site>
  1. While inside your site's directory, run the web server (WEBrick):
                                rails server
  1. Open your web browser to view your site: http://localhost:3000/

No comments:

Post a Comment