Archive for the ‘Ruby on Rails’ Category

Custom Scaffold for Rails

March 1st, 2007 tony 19 comments

Ruby on Rails Custom ScaffoldingIt has been said so many times that scaffold generator is only useful for learning how Rails works and maybe for rapid prototyping and I certainly agree. But scaffold is one of the big things that really excited me when I first discovered Rails.

Why is Scaffold Generated Code Useless?

Actually I think the stubbed out functions in the controller as well as most of the views are already a great time saver but its really the generated list and show code that is useless:


< % for cat in @cats %>

< % for column in Cat.content_columns %>

< %=h cat.send( %>

< % end %>

< % end %>

Iterating over columns means that I can do nothing but rip this out and explicitly write out each column so I can then change the look and feel to be consistent with my app. Also, what if I want to use div’s instead of tables? Rip it apart.

Read more…

Categories: Code, Ruby on Rails Tags:

Best Ruby on Rails Hosting

February 26th, 2007 tony 4 comments

For the Ruby on Rails apps we are currently building we definitely want to host on beefy dedicated servers but I’ve recently started rebuilding raleigh list in Rails and while this site does a decent amount of traffic it doesn’t justify the time and money to setup a dedicated box especially since 90% of the traffic will be on page-cached pages. So I started looking around for something like VPS Rails hosting and read Geoffrey’s excellent review of his real world experience with multiple different Rails hosting providers. You can tell this is the real deal, honest opinion as there isn’t one affiliate ID attached to any of the links to the host providers so Geoffrey isn’t trying to make a buck here. You’re on a roll Geoffrey! I’ve been loving the peepcode screencasts.

So I’ll save myself some headache and give RailsMachine a try. But it sounds like you can do ok with Dreamhost if you are trying to go on the cheap. I can throw in one additional experience here and say that the ultra cheap a small orange was not worth the money as fast-cgi on their shared hosting was painfully show for me. Perhaps their higher-tier services are better but I really like the sound of the railsmachine gem setting up the entire environment for me in under an hour.

Categories: Hosting, Ruby on Rails Tags:

Better Search Engine Friendly URL’s with Ruby on Rails

February 4th, 2007 tony 8 comments

In my last post about SEO and RoR I gave really BAD advice on how to accomplish clean URL’s that are search engine friendly. Our first RoR project consists of pages that are nearly 100% unspiderable by the search engine bots because its an app that requires login to do anything so I hadn’t really sat down and worked out the proper way to do URLs.

Read more…

SEO for Ruby on Rails

January 26th, 2007 tony 10 comments

3000 is the new 8080Now that the NotSleepy camp is actively switching to mostly Rails development for our web apps I’ve been exploring how to accomplish the typical onpage stuff commonly needed with PHP and JSP to get Googlebot and Slurp to snuggle up all cozy with your site. The following tips are just a way to use Rails to accomplish common tasks you should be comfortable with in your current choice of web app/language.

Read more…

Ruby on Rails Scalability – Is it a Problem?

November 26th, 2006 Tony 6 comments

Nick Wilson caught my eye on his new podcasting blog when he stated/asked “Ruby on Rails doesn’t scale?”. Its no secret that we’ve been shifting the NotSleepy shop from a PHP on the front, Java on the back setup to Ruby on Rails for the past few months. In fact we started a new RoR training side business with David Black, and have been building a new suite of tools from scratch in Rails. The experience has been nothing short of revolutionary for me and has been more liberating than switching from briefs to boxers in my teens. So when someone claims I’m not going to be able to scale this thing I felt my heart sink.

Read more…

Categories: Ruby on Rails Tags: