saasbook/courseware — pull request #7 by VMTrooper (2014-04-19 07:55:34+00:00)
Title: Added Vagrant Support

Hello Professors. I noticed that a scripted build file contained references to Vagrant, and I decided to try creating a Vagrantfile for the class setup. If you accept this change, let me know if you would like me to do a small write-up for students interested in trying Vagrant.

Please be aware of the following caveats:
* Vagrant 1.5 or higher is required

* I created a separate deployment script file that is specific to Vagrant (configure-image-vagrant-0.10.3.sh)

* All references to "~/" are changed to "/home/vagrant" so that the user can use rails immediately when they login. When Vagrant is used with the stock scripts, it makes all of the profile changes for the root user and the user has to sudo su to work on assignments.

* The RVM site appears to have a problem with its SSL Certificates, and this prevents successful download of the 32-bit version of 1.9.3 with curl (even with the -k option). The 64-bit version of 1.9.3 downloads without problems. So, the Vagrant build is based on the hashicorp/precise64 image.

* The base image is fairly bare bones. So, I had to install additional packages for missing utilities like add-apt-repository

* I updated the rdoc gem to v 4.0.1 to get rid some of the UTF-8 conversion messages. Unfortunately, it's not possible to get rid of all of them, but they seem to be cosmetic.

The image appears to build successfully. I created a test rails app as listed below, and the page loads successfully in the web browser with 200 OK output on the console:
rails new myapp
cd myapp
rails server