Sunday, June 21, 2009

Workshop 2 Challenge Question 1) Rails & the MVC

I have examined the directories where the rails applications are located and I can see under the app directory there are the following subdirectories:
controllers
models
views

Checked the wiki at http://wiki.rubyonrails.org/rails/pages/UnderstandingViews but it doesn't exist.

I haven't actually created my Taxi application yet, so I will do that now.

Using Instant Rails I click on the I button and select Rails Applications then Manage Rails Applications... As per the instructions on the screen, I click on the Create New Rails App... button which takes me to the command prompt. From here I issue the following command:
rails Taxi
which creates a whole list of directories and files within. (including the 3 mentioned above)

I then run my application by clicking the Refresh List button and then ticking the box next to my Taxi application in the Rails Applications window. I then click on the Start with Mongrel button to start my Taxi application.

I then go to my browser and browse http://localhost:3000 where I get the following screen:



So far so good.


No comments:

Post a Comment