WINDOWS SYSTEMS: INSTALLING RUBY ON RAILS ------------------------------------------------------------------ NOTE: As of 4/19, Ruby on Rails has been installed under Windows on the following stations in the Computer Science Lab (RH 223): alarka, alexander, dellwood, franklin, marshall, murphy ------------------------------------------------------------------ PHASE 1: 1) Download and install Ruby 1.9.2 (should create folder C:\Ruby192) 2) Edit the system PATH environment variable to include C:\Ruby192\bin 3) Download RubyGems 1.7.2 ZIP file and extract the folder it contains 4) a) Launch a command window (keep this around for later steps) b) cd into the extracted Gems folder c) Enter the command ruby setup.rb 5) Copy the SQLite DLL file (sqlite3.dll) into C:\Ruby192\bin 6) Enter the command gem install rails PHASE 2: 1) Create and/or move to a convenient folder for storing your Rails webapps (each will be a separate subfolder) 2) To create a new webapp named "hello", enter this sequence of commands: rails new hello cd hello bundle install rake db:create rails server 3) If all steps in (2) worked correctly, launch a brower and enter the URL http://localhost:3000 Let us hope you now see the Rails "Welcome aboard" page... Now shutdown the Rails web server (use ctrl-C) and continue: PHASE 3: 1) Enter the command rails generate controller home index Now look for folder: hello\app\views\home\index.html.erb, edit as desired to customize page 2) Find and remove the file "hello\public\index.html" (if present, this will prevent the file above from becoming the welcome page) 3) Find and edit the configuration file "hello\config\routes.db" as follows: locate and uncomment the line # root :to => "welcome#index" Then change "welcome" to "home", so the final line is root :to => "home#index" 4) Restart the Rails server (rails server), and again use your browser to load the URL http://localhost:3000 Hopefully you now see your hello webapp's home page...