(This page assumes that your machine is already setup for KnockKnock development.)
If you are so lucky as to have someone install and configure RadRails and Locomotive and MySQL and Subversion for you, here’s a quickstart to use (hi Kate!) Just hypothetically, let’s say the name of our project is KnockKnock.
Make sure MySQL is running by going to System Preferences->Other->MySQL.
Start RadRails.
Click on the Servers tab at the bottom. Click on KnockKnockServer. Click the green triangle to start the server. You should now be able to go to http://localhost:3000/main and see the main page of our site.
Next we’ll get any code changes from our Subversion repository. Ctrl-click on KnockKnock in the Rails Navigator pane. Choose Team->Update. (Eventually I’ll figure out how to add this as a button on the toolbar…)
Here’s the minimum you need to know about the directory structure:
public/ - Static content
-
A file
whatever.html under here will be accessible at /whatever.html on our site.
.../stylesheets/site.css - main stylesheet for the site
app/views/ - Dynamic templates
-
A URL like http://localhost:3000/face/list/ generally maps to
.../face/list.rhtml
.../layouts/site.rhtml - main layout (navbar, etc)
.../face/list.rhtml - template for /face/list on our site. Similar for other pages.
.../face/_form.html - templates that start with an underscore are for things inside a page. e.g. this one is to render the form inside .../face/edit.rhtml
To commit your changes back to the repository, ctrl-click on KnockKnock in the Rails Navigator and select Team->Commit.
If you have problems where the site complains about missing columns in the database or whatnot, click on the Rake Tasks tab on the bottom bar. Select db:migrate in the drop-down and click Go. This should update your database with the required changes.