RailsFTW v0.5s out

Rails FTW

Not really a major update on the main installer: just updated a couple of gems and included the command line shell for SQLite3.

The big update is the addition of a Ruby 1.8.7 installer. As mentioned in my previous post, RailsInstaller is a bit faster than RailsFTW because of 1.9.2’s slow performance. Because of this, I decided to put up a 1.8.7 option for RailsFTW.

At first I thought it was going to be an easy task. Unfortunately, mysql2 wasn’t cooperating when used it in combination with Rails and I had to ask for help. Fortunately, Luis Lavena pointed me to a recently discovered bug in the mysql2 gem and I was able to make it work. The downside is that the patch isn’t official yet so I’d have to mark the 1.8.7 version of RailsFTW as “experimental”.

Anyway, just head over to http://railsftw.bryanbibat.net to find the latest installers.

RailsInstaller (and obligatory RailsFTW comparison)

The true successor to InstantRails is out: Wayne Sequin of RVM fame, with the help of Dr. Nic Williams and RubyInstaller‘s Luis Lavena, has just released the first version of RailsInstaller.

RailsInstaller

Now I can finally stop worrying about how to find time to maintain RailsFTW. :D

Continue reading “RailsInstaller (and obligatory RailsFTW comparison)”

[Follow up] CD-R King’s Cheap Solid State Drive

Last year, I bought two really cheap SSDs from the unlikeliest of sources: CD-R King.

Everything about it was just screaming BAD IDEA. Someone over at HardOCP’s forum even suggested the drives will have “gone to shit” in just 4 months.

Let’s see how much the performance has degraded a year later:

ssd performance a year later

As expected, the drive has degraded a bit, its performance half of what it was last year. For reference, here’s the HD Tune performance just after I first installed them (with a brand new OS and all) last year:

ssd performance a year ago

A 50% drop in performance might be disappointing, but when you take into account the expected performance of top non-SSD hard drives, it’s still pretty impressive. Here’s the graph of the comparison drive last year (Western Digital 10K RPM Raptor):

hdd performance

So no, performance still hasn’t gone to shit yet.

Starting a “professional” Rails app with Haml, Rspec, Devise, and Web App Theme

Update 2: This tutorial is way out of date. If you want to create a modern (ie. 2015) app, please use a generator like RailsBricks.

Update: Tutorial for Rails 3.1 here!

crud screen

Every Rails developer knows how to create a Rails app. It’s easy as

rails new APP-NAME-HERE

But how many know how to create an app from scratch that looks good enough to sell to clients i.e. with slick design, authentication, authorization, and all that? Sure, there are tutorials out there that cover those components, but most of them cover them only in isolation from each other. A quick tutorial containing multiple components at a time would be a valuable resource to anyone planning to start a new app.

As the resident dilettante in these parts, I’ve decided to create such a tutorial based on a recent demo I made for a prospective client.

This post will discuss how to create a Rails 3 application that looks good enough to sell to clients (of course, YMMV) while still having components found in “professional” apps. This tutorial will cover the following:

  • Andrea Franz’s web-app-theme gem – I only recently found out about this theme generator gem. Had I discovered this sooner, I might not have made “I hate web design” a catchphrase. Basically this gem generates themes for your web app (hence the name). The demo and the list of available themes can be found on this page. The main downside to this gem is the lack of tutorials on the net about it. Hopefully this post will give people an idea what to expect with the gem.
  • Devise – our authentication module. Authlogic‘s fine, but I find Devise’s approach less obtrusive.
  • Haml – replaces Erb. Not perfect (e.g. screws up with inline a tags) but the drastic decrease in code makes passing it up difficult.
  • Rspec – replaces Test::Unit. Only setup will be covered in this post, actual usage is left to the reader.
  • will_paginate – gem for pagination. Everybody uses it, so what the hell…

Rest of the tutorial is below the cut.

Continue reading “Starting a “professional” Rails app with Haml, Rspec, Devise, and Web App Theme”