CreatingAwesomeWebsitesWithRubyOnRails - Creating Awesome Websites with Ruby on Rails Tommy MacWilliam Ruby MVC Creating Awesome Websites with Ruby on

CreatingAwesomeWebsitesWithRubyOnRails - Creating Awesome...

This preview shows page 1 - 13 out of 53 pages.

CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsCreating Awesome Websites withRuby on RailsTommy MacWilliamHarvard UniversityNovember 13, 2010
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsTodayIthe Ruby programming languageIMVC: what and why?IRiding the Rails like a pro
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsTodayIare you ready?Icreating awesome web applications is not a spectatorsport
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsSetupIIRuby 1.9.2 is recommended (that’s what I’ll be using)IWindows users, make sure you check all the boxes onthe installerIthen, rungem install railsIthis will install Rails 3.0 (which is different than Rails 2!)Idon’t worry if nothing comes up on the terminal for awhile, it’s downloading
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsSetupIif you run into an error message about sqlite, then graba binary from IWindows: copy the DLL to the “bin” folder in your Rubyinstall path (on Windows, probably C:\Ruby192\bin)IUNIX: make sure you’ve installedruby, ruby-dev,sqlite3, libsqlite3-dev,andlibsqlite3-rubyIif you get an error message about ruby or rails notbeing found, make sure the binaries are in your PATHIGoogle is your friend, you’re not the first person to havetrouble
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyIWikipedia says, “Ruby is a dynamic, reflective, generalpurpose object-oriented programming language”Isounds cool to meIRuby wants to help you get stuff doneIclean, readable, intuitive syntaxIno petty low-level stuff (aka pointers)Ihuge standard library, 100% documented
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyI“Hello, World!” program in C (in case you forgot):#include <stdio.h>int main(int argc, char**argv) {printf(“Hello, World\n”);return 0;}
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyI“Hello, World!” program in Rubyputs “Hello, World!”
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyIowned.
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyIminor syntactic differencesIno more braces:enddesignates the end of acondition/loopIno more semicolons eitherIparentheses for function arguments are optionalI#is a single-line commentI=beginstarts a multi-line comment,=endends amulti-line commentIelsifkeyword is used instead ofelse if
CreatingAwesomeWebsites withRuby on RailsTommyMacWilliamRubyMVCRailsRubyIRuby is an interpreted language: no compiling, justwrite code and run itIRuby is dynamically typed: you don’t need to specifytypes for variables and functionsdef say_hello(name)puts “Hello, ” + nameend
CreatingAwesomeWebsites with

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture