Skip to content

Instantly share code, notes, and snippets.

@karlstolley
Created April 26, 2012 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save karlstolley/2495142 to your computer and use it in GitHub Desktop.
Save karlstolley/2495142 to your computer and use it in GitHub Desktop.
Computer Prep Instructions for End-to-End Agile Web Application Development from Basically Nothing

The workshop will require a number of technologies, which time will not permit us to set up on site. So, find your operating system below (Windows or Mac; if you're on Linux, let me know), and follow the steps to get your computer set up ahead of time. If you have any problems, email karl.stolley@gmail.com

At the request of some participants, I've also provided links to some reading material at the very bottom of this page. Look through that stuff if you have the time or interest.

Windows

First, you'll want to have a good editor on hand for the workshop. You can't do much better than Notepad++; just download and unzip this file: http://download.tuxfamily.org/notepadplus/6.1.2/npp.6.1.2.bin.zip Unzip the file; there will be a folder called unicode; just copy that folder to your desktop (you might want to rename it Notepad++). Done!

Next, you'll need to install Ruby on Rails. The RailsInstaller is the best way to go for Windows: http://railsinstaller.org/

The instructions are comprehensive and fairly simple (download, double-click, and install; accept all of the default settings), and you should be able to install RailsInstaller without having an administrative account on your computer.

After RailsInstaller is all set up, close the terminal window it opened, and open a new one (go to Windows' Start menu, choose Run, and then type cmd and press return).

  1. At the prompt in the new terminal window, type mkdir Rails (this creates a new directory, Rails, where we'll create our Rails apps at the workshop)

  2. Then, change into that directory by typing cd Rails

  3. Create a new Rails app, called demo, by typing rails new demo (a bunch of output will fly by).

  4. Change into that directory by typing cd demo

  5. Next--and don't worry about what this does (that's for the workshop)--type rails generate scaffold Page title:string content:text (more output will fly by)

  6. Then, type rake db:migrate (more output)

  7. Finally, type rails server and go to your favorite web browser and point it at http://localhost:3000/pages; you should see a simple white page with "Listing pages", "Title Content", and a link for New Page (try and create one, if you'd like).

  8. If you did all of that without running into any errors or problems, you should be set up. And, you've already created your first Rails app! Hit Ctrl Pause/Break back at the terminal window, type Y when you're asked to Terminate batch job? and then close the terminal window.

  9. Bonus round: If you're looking to be extra awesome, create yourself a GitHub account at https://github.com/signup/free and set up Git for use with GitHub; follow the instructions at http://help.github.com/win-set-up-git/ starting at the step Check for SSH Keys. See you on May 17!

Mac OS X

[NOTE: You must have an administrator account or administrative rights on the Mac you're installing to.]

First, you'll want to have a good editor on hand; TextWrangler is a good, free option. Google for the website or download it straight from the Mac App Store.

Now it's time to install Rails and some other goodies.

  1. You need to register as an Apple Developer (this is free, versus the $99/yearly dev programs); go to https://developer.apple.com/programs/register and choose the Get Started button. You can use your existing Apple ID if you already have one.

  2. Install XCode tools from the Mac App Store (older OSXs include Xcode on the OSX install disc; although you should be able to get a newer Xcode via the App Store)

  3. Once the app is installed, double-click and accept the Xcode license agreement, and allow Xcode to install the Mobile Device Framework and any other components it asks to.

  4. Once installation is complete, you'll be invited to start Xcode. Do that.

  5. Go to the Xcode menu and choose Preferences and then Downloads from the resulting window. Click the Install button next to the Command Line Tools. You'll be asked for your Apple ID, which you should have registered with the Apple Developer site in step 1.

  6. Next, you'll install the Ruby Version Manager. Open a Terminal window (in Applications > Utilities or type Terminal in Spotlight Search), and follow the first three commands/instructions at https://rvm.io//rvm/install/

  7. Once you've installed RVM, type rvm install 1.9.3

  8. Set 1.9.3 as your default ruby: rvm --default use 1.9.3

  9. Finally, install Rails by running gem install rails (this will install a bunch of dependencies, too)

Now's the time to test things out:

  1. At the prompt in the terminal window, type cd to make sure that you're in your home directory. Then, type mkdir Rails (this creates a new directory, Rails, where we'll create our Rails apps at the workshop)

  2. Then, change into that directory by typing cd Rails

  3. Create a new Rails app, called demo, by typing rails new demo (a bunch of output will fly by).

  4. Change into that directory by typing cd demo

  5. Next--and don't worry about what this does (that's for the workshop)--type rails generate scaffold Page title:string content:text (more output will fly by)

  6. Then, type rake db:migrate (more output)

  7. Finally, type rails server and go to your favorite web browser and point it at http://localhost:3000/pages; you should see a simple white page with "Listing pages", "Title Content", and a link for New Page (try and create one, if you'd like).

  8. If you did all of that without running into any errors or problems, you should be set up. And, you've already created your first Rails app! Hit Ctrl C back at the terminal and then close the terminal window.

  9. Bonus round: If you're looking to be extra awesome, create yourself a GitHub account at https://github.com/signup/free and set up Git for use with GitHub; follow the instructions at http://help.github.com/mac-set-up-git/ starting at the step Set Up SSH Keys. See you on May 17!

Some Reading Material

A few people have asked if there are things to read ahead of the workshop, so I've put together this list (I'll distribute a full reading list at the workshop, too), if you have the time/interest or want something to do on the flight to NC:

  • Ruby in Twenty Minutes (a basic tutorial for Ruby, the language Rails is written in): http://www.ruby-lang.org/en/documentation/quickstart/ (You'll be able to do this tutorial after you've done the setup above.)

  • Jeremy Keith's HTML5 for Web Designers: http://html5forwebdesigners.com/ (available online for free; from the TOC at the right, you can browse through some relevant chapters for the workshop, including 1, 2, 4, and 5. Maybe 6, too, if you're interested.

  • Ethan Marcotte's Responsive Web Design article from A List Apart: http://www.alistapart.com/articles/responsive-web-design/

  • The Git Community Book (for Git, the version control system we'll use): http://git-scm.com/book Sections 1.1, 1.2., 1.3, and the Your Identity part of 1.5; and Sections 2.1, 2.2., 2.3. If that's not enough, you can also look at 2.5, 2.6, 3.1, 3.2, and 3.3.

@alexch
Copy link

alexch commented May 9, 2012

A more expansive version of these instructions is at the Railsbridge Installfest -- it would be great if you could check our instructions against yours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment