All commands are preceded by the $ sign. You must enter the commands in a terminal without typing the $ sign. Assumptions: ======================== 1. You are using Mac OSX Yosemite (10.10.x) or later, or Windows. 2. (a) Mac users: it is necessary that you have the updated command line tools installed for Xcode. You can check by entering the following command (note the two dashes in --install): $ xcode-select --install You'll see a dialog box. Choose "Get Xcode" and update/install Xcode from the App Store. 2. (b) Mac users: download and install an appropriate version of "command line tools" for Xcode from the following website (for me it was Command Line Tools for OSX 10.10 (Yosemite) and XCode 7.1; versions will be different for later OSX): https://developer.apple.com/downloads/. (Note: Previously, command line tools had to be installed separately, but the newer versions of Xcode is bundled with command line tools. There's a lot of confusion regarding this on third-party websites and blogs. Here's an authentic resource: https://developer.apple.com/library/ios/technotes/tn2339/_index.html. However, I *highly recommend* installing command line tools separately from https://developer.apple.com/downloads/.) To verify that command line tools are installed, enter the following command, which will show the version of gcc in the success scenario. $ gcc --version 3. For Mac users, you have homebrew installed. To check whether you have it installed, enter the following command: $ brew If homebrew is not installed, install it by entering the following command: $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (The above command uses an older version of Ruby, which comes built-in with Mac. The next step will install an updated version of Ruby.) 4. You are logged in with admin privilege. Install Ruby: ======================== Mac: Install RVM from https://rvm.io/rvm/install or enter this command (it will ask for your password a few times): $ \curl -sSL https://get.rvm.io | bash -s stable --ruby * Follow the instruction given when the above command is completed. E.g., I had to run the command "source /Users/mirfan/.rvm/scripts/rvm" (without the quotes). To test, commands are: $ ruby –v $ rvm –v If you get errors, you might not have followed the instruction shown in the terminal when the above \curl -sSL ... command finished running. Still having error an error with rvm -v? Run the following commands (assuming 2.2.1 is the latest version—look up rvm website for it; also assuming you have homebrew pre-installed) $ brew update && brew upgrade $ rvm reinstall 2.2.1 --disable-binary Windows: 1. Install Ruby 2.x from http://rubyinstaller.org/downloads/ 2. Then install the Ruby Development Kit: 2a. Download an appropriate version from http://rubyinstaller.org/downloads/ and extract it 2b. Follow installation instructions: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit (The instructions basically tell you to execute these two commands from the appropriate directory (use cd to change directories): $ ruby dk.rb init $ ruby dk.rb install ) Install Ruby's Gem Packaging System (for both Mac and Windows): =============================================================================== 1. Get the zip file from http://rubygems.org/pages/download Extract it Go (cd) into the extracted folder where you can see the "setup.rb" file Execute this command: $ ruby setup.rb 2. Update gem. For this, execute this command: $ gem update --system Install Ruby on Rails: ============================ Step 1 is for Windows only (for Mac, you already have SQLite pre-installed) 1. (Windows only) First, install SQLite DBMS: Extract the contents of the zip file "sqlite-dll-win64-x64-3090100.zip" from https://www.sqlite.org/download.html into Ruby's bin folder. For example, I've copied the DLL and the DEF files into my Ruby's bin folder, which is "C:\Ruby200-x64\bin". If later on you get an error message, build sqlite from the source and do the installation following the 9 steps from "http://stackoverflow.com/questions/15480381/how-do-i-install-sqlite3-for-ruby-on-windows". (Note that you may omit Step 1, as you've already installed Ruby development kit.) 2. (Mac) Command: $ gem install sqlite3 (Windows) Run the following command (directory names might be different): $ gem install sqlite3 --platform=ruby -- --with-sqlite3-include=c:\Ruby200-x64\sqlite3\include --with-sqlite3-lib=c:\Ruby200-x64\sqlite3\lib --with-sqlite3-dir=c:\Ruby200-x64\sqlite3\bin (Note: previously, sqlite3 was named sqlite3-ruby) 3. (Both Windows and Mac) Command: $ gem install rails To test rails installation, enter this command: $ rails -v Install Other Ruby Gems: =========================== $ gem install twitter $ gem install mail Install Aptana Studio (IDE) ============================== Aptana Studio: http://www.aptana.com/ (For Mac) If you cannot start Aptana due to a Java error, you'll need to install an earlier version of Java from here: https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US Many software on OSX Yosemite are not compatible with the newer version of Java. Install the Haskell Platform ================================== http://www.haskell.org/platform/ Install Prolog (if covered in class) ======================================= Prolog: http://www.swi-prolog.org/Download.html