Game of Life Wallpaper published to Android Marketplace

screenshot of wallpaper

That little app/wallpaper we made at the code retreat? I’ve published it and it’s now free for download at the Android Marketplace.

At the moment it’s not properly indexed in the Marketplace yet so searching “Game of Life Wallpaper” won’t return the link. A workaround is to search it using the search terms “code retreat“.

Notable CD-R King Items Holidays 2011 Edition

It’s been almost two and a half years since my post about hidden gems within the multitude of (often crappy) products found in CD-R King. Since that post, I’ve found a couple of new interesting finds worth a blog post.

No, there won’t be any obvious things here (e.g. the laptop, netbook, tablet, etc). I prefer not-so-obvious items that are mostly relevant to my interests.

Continue reading “Notable CD-R King Items Holidays 2011 Edition”

RailsFTW v0.9 released, now with Rails 3.1

Rails FTW

Thanks to a Battlefield 3 Beta losing streak that I blame on my sucky internet connection, I’ve decided to update my hack-job of a standalone Windows installer for Rails.

Now there are two separate installers, a Ruby 1.8.7 + Rails 3.0.10 installer and a Ruby 1.9.2 + Rails 3.1.0. Here’s a table to give a quick comparison between these two installers with RailsInstaller thrown into the mix:

  RailsInstaller 2 RailsFTW (Rails 3.1) RailsFTW (Rails 3.0)
Ruby version 1.9.2-p290 1.8.7-p352
Rails version 3.1.0 3.0.10
File Size ~55MB ~20MB ~10MB
DB Adapter Gems sqlite3, pg, tiny_tds (MS SQL Server) sqlite3, mysql2
Additional Features git, DevKit
Internet Connection Required? Yes No (Bundler will fail to connect to server but new apps will still work) No
Compiled by Some of the biggest names in the Ruby community Some random third world developer. LOL

Starting a “professional” Rails 3.1 app with Web App Theme, Devise, and Kaminari

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

With the recent release of web-app-theme providing Rails 3.1 support, it’s time once again for me to write a tutorial on how to earn money from cheap clients who can’t afford designers.

For reference, the previous tutorial can be read 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.1 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 – 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.
  • 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.
  • Kaminari – gem for pagination. We’re going to use it in place of the previous gem will_paginate

Rest of the tutorial is below the cut.

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

[Follow Up] Styling the Sign-up form in Web App Theme

Two days ago, a reader emailed me asking for help on my previous tutorial. There I was able to convert Devise’s sign in form to use Web App Theme’s CSS, but I didn’t provide details on how to style the other form: the sign-up form.

The change required is pretty simple actually, just as long as you understand what I did in that tutorial. First, you need to tell Rails to override Devise’s RegistrationsController’s layout to use the “sign” layout (just as what we did with SessionsController which handles the sign in):

    config.to_prepare do
      Devise::SessionsController.layout "sign"
      Devise::RegistrationsController.layout "sign"
    end

Then modify the app/views/devise/registrations/new.html.haml file accordingly. If all goes well, you should get something like:

sign up page

The steps to convert the “Forgot your password?” page is left to the reader.