A Minor Shift on the Rails

9 Feb

The ice has been getting a bit thin on the Rails tutorial and I’ve been feeling like I really need to go back and start it again to reinforce the knowledge I’ve learned so far, and to hopefully fill in some gaps of which there are…many.

I wanted to mention one little thing that finally hit home.

Previously, when I looked at a url (URI, really) for this Rails sample_application like this:


I wasn’t thinking through what it really meant. I was picturing it in my mind as “a file called home (.html presumably) sitting on a server somewhere in a directory called ‘static_pages’.

But it’s not that at all!

Rather, I’m just now starting to read it like this:

“In the static_pages controller, run the ‘home’ method.” That in turn leads to the home.html.erb view, but the view was in no way being pointed to directly in the way I was at first envisioning. It says as much plain as day in the tutorial, but all those darn trees made it hard for me to see the forest.

It’s actually been a very bad day for Rails for me today. Before deciding to re-do the tutorial, I was trying to follow another, shorter tutorial on creating a blog with Rails. That’s something I’d like to do down the road, moving this blog to a new, similar but different, home on Heroku. I thought that I had perhaps learned enough to make sense of a tutorial that was a little faster and looser than the one I’ve been following.

Au contraire! It only served to illustrate (usefully, if not painfully) how little I really understood of what I’ve done so far. It’s very easy to coast along a tutorial and say, “Yeah, I got that,” and still miss a great deal.

Hey, if I have to ‘lather-rinse-repeat’ twenty times before it sinks in, then that’s what I’ll do.

I’ll have a clean head of hair if nothing else.


Comments are welcome!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: