Archive for November, 2007

25
Nov
07

Moving along…

The Thanksgiving break didn’t allow for much Ruby on Rails development, but I did get a chance to work on a admin section so I can have a content management system.  I also went through the Peepcode Screencast rSpec part I.   If you haven’t taken a look at the Peepcode screencasts, I highly recommend it.  I am going to post a little later my work on getting my cms system set up.

19
Nov
07

Another day….

I got my database working on my site.  It wasn’t easy and took me a bit to get it right.  This should be my last hiccup before getting really cranking on some development.  I am able to deploy my site using capistrano.  Here is my development environment:

First off, I use Windows as my operating system.  I have Ubuntu Linux installed on my laptop, but I am not used to Linux and still having some time getting a development environment set up there.

Development IDE: Netbeans 6.0 beta 2.
Repository:  My hosting provider has a subversion repository so I commit my changes directly from Netbeans to my Subversion repository.  It is very nice.
Deployment:  After a group of changes that have been verified, I then run Capistrano to deploy my application.  I am very happy with this setup.

I have used other development IDE’s such as RadRails and Aptana IDE, but I am not able to get them to work like i’d like.

Today I set up my server’s MySQL db and configured my rails application to work with MySQL.  After some trouble (using the correct username and password is important I guess), I am to interact with the database.

Still planning on sharing my design ideas for my site.  Coming soon….

Mike Riley

18
Nov
07

The latest

Well, it’s been a while and I plan to get back into the swing of posting. I have been busy working on my Ruby on Rails site. It will always be a work in progress. As I work on it I plan on posting code here of things that I use on the site. I’d like to share my code in the event I may help others or others may have something to add to what I am doing.

Coming next will be why I have had the big delay in between posts. Most notably is due to design issues with my site. I have done quite a few versions, but was never really happy with what I had come up with. I’ll post screenshots of what I did so you all can see the designs.

The other reason is I was at RubyConf in Charlotte, NC. I saw and met quite a few people. I met up with Joe O’Brien, Michael Buffington, Marcel Molina, Chad Fowler, David Black, Geoffrey Grossenbach, Alex Payne, Evan Light, Obie Fernandez, Scott Barron and others. It was a great time. I miss it already. I learned quite a bit.

Finally, I started up a Cleveland/Northeast Ohio Ruby Users Group. We had our first meeting and the next meeting I am planning on giving a talk about Ruby. This will be followed by a talk by Joe Fiorini on Ruby on Rails. Should be a good time.

I’ll finish up with some code that I used on my site:

I like it when sites use a design that has an index page that differs from the rest of the site. To do this with Rails is easy. All you have to do is to use 2 different layouts for your 2 different designs. I first created a site controller for all the pages on my site. Then inside the site controller I added the following code:

layout :choose_layout

private
def choose_layout
if [ 'index' ].include? action_name
‘index’
else
’subPage’
end
end

This is pretty much saying that if we are going to access the index action, then display the index layout otherwise use the subPage layout. Very easy.

Take care
Mike Riley