1 / 16

Web Science Stream

Web Science Stream. Installing ROR. What is Instant Rails?.

haracha
Download Presentation

Web Science Stream

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Science Stream Installing ROR

  2. What is Instant Rails? Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.

  3. Step 1 – Download and Unzip • Download Instant Rails from • http://rubyforge.org/projects/instantrails/ • Files > InstantRails-2.0-win.zip • Unzip the file into C:\InstantRails

  4. Step 2 – Start railing • Double click on InstantRails.exe • Just click OK or Continue • You should be presented with the InstantRails console

  5. Instant Rails Console Web Server Database

  6. Updating Instant Rails • Opening a Ruby Console

  7. Type: gem update --system

  8. Type: gem update

  9. Welcome to ROR

  10. Let’s get our hands dirty! Create a ToDo application in 5 minutes ...

  11. Steps (1) • Open a ruby console Instant Rails Menu > Rails Applications > Open Ruby Console • Where you want to create your application type rails todo This will create the whole directory structure

  12. Steps (2) • Go into the todo dir cd todo • Load the server by typing ruby script/server 5. Access it through a normal browser by going to http://127.0.0.1:3000

  13. So far so good ...

  14. Steps (3) 6. Let’s use some scaffolding ... ruby script/generate scaffold Item name:stringdescription:text 7. Let’s make the database rake db:migrate 8. Let’s try it out http://localhost:3000/items

  15. Here’s your 5 minutes ToDo list

  16. Exercise Create a simple recipe database which contains the name of the recipe, the ingredients, the quantities and the description

More Related