My group in Assistive Technology class is creating a web-based system for memory training designed towards people with memory impairments and related cognitive problems.
I’m writing the web application using Ruby on Rails. We’re modifying Rob Faludi’s Social Genius to use the data collected at our site.
I’m doing the Rails development on my Windows box and deploying to Dreamhost. Kate is working on the web design on OSX. My notes on setting up Rails on OSX for our particular application follow. They may or may not be of use to anyone else (YMMV).
Create your working directory
Create the directory snappy under your home directory.
Install Rails
Download Locomotive. When you decompress it, you will be shown the Locomotive2 directory. Drag it into /Applications.
We won’t actually run the Locomotive program since we will control our server through RadRails.
Install MySQL
Get it from the MySQL download page. Install it.
Now if you go into the System Preferences there should be an item for MySQL. Click that then click “Start MySQL server”.
Install RadRails
RadRails is a nice IDE built on Eclipse that is tailored for Rails.
Install it from the RadRails download page. I recommend copying the radrails directory into /Applications.
Start RadRails. It will ask you to choose a workspace. Choose our working directory (~/snappy). You can safely check “Use this as default”.
Follow the instructions in the RadRails user manual for Locomotive users to configure RadRails to use Locomotive. You don’t need to create a new project.
Now we’ll get our project files from our Subversion repository.
Start RadRails. Go to File->New. Select SVN->Check Projects from SVN. Select “Create a new repository location”. For Url enter http://www....... You will be prompted for username and password. Click to the next screen and you should see a list of directories. Click on the project directory (KnockKnock). Click Next. Leave the default name of KnockKnock. Click Next. Leave “Use default workspace location” checked. Click Finish. KnockKnock should now appear under the Rails Navigator pane.
Create and update database
Open Terminal. Run the following command to create the database. (TODO: put this in migration script so we can skip this step.)
$ /usr/local/mysql/bin/mysql -u root < ~/snappy/KnockKnock/db/create_development.sql
Go into RadRails. Click on KnockKnock in the Rails Navigator pane. Now click on the “Rake Tasks” tab in the bottom pane. Click the circling arrows to update the rake tasks. Select db:migrate in the drop-down menu then click Go. Your database should update.
Create KnockKnockServer
In RadRails ctrl-click on KnockKnock in the Rails Navigator pane. Select New->WEBrick Server. The defaults are fine. Click Ok. KnockKnockServer should now appear in the Servers tab in the bottom pane.
Start hacking!
Now we’re ready for the KnockKnock RadRails QuickStart.