Archive for 'gem'

Bundle Install – missing mysql.h

If you’re seeing the following error: The way I was able to resolve it was to follow Boonedocks.net, since I’m also using MAMP for its MySQL Database instance. The only difference is that I already had MAMP 1.9.4 installed and so I had to download the MAMP_components_1.9.dmg which contains the mysql-5.1.44 source code. MAMP 1.9.4 [...]

Deploy to EC2 with Rubber on Rails 3

Rubber is a gem which makes it easy to make multi-instance deployments of your rails app to EC2. It uses capistrano to do this. Before proceeding, make sure you have your EC2 account created and have a keypair set up with Amazon. Here is recipe of what I’ve done so far. I’m running into issues [...]

Easily Replace Prototype and Scriptaculous with JQuery

There is a very cool gem called jquery-rails which provides you one rails generator which will replace your Prototype and Scriptaculous JavaScript libraries with JQuery, within your Rails app. It will download JQuery and install it for you under your public/javascripts directory. I believe this gem only works with Rails 3. I’ve only tested it [...]

Building a Simple Addressbook with Authentication using Devise

Assumptions: You are using Rails 3, even though I tried to accomodate Rails 2 as well. In this Tutorial / Recipe, l go through creating a very simple “Addressbook” with Devise as its Authentication system. This Addressbook only contains two fields name and phone. A User model is generated with authentication using the Devise gem. [...]

Authlogic vs Devise for Authentication in Rails

The following post has been written by Brian Morearty. Here he compares Authlogic to Devise. I’m posting the following with his permission. "Here’s my comparison. Please keep in mind this is after only having used Authlogic for a few months (I used it on another project) and Devise for a few hours: Authlogic and Devise [...]

Wym_Editor (WYSIWYM) Plugin for Rails

The wym_editor (WYSIWYM – “What you see is what you mean”) plugin is pretty cool. It allows you to define which form fields you want to offer WYSIWYM editing functionality. This makes it easier for you to edit fields and give them styles. It also allows you to see the HTML source view while you [...]

Dealing with Money in Rails

In process of determining how to handle fields such as price, in Rails, I’ve conducted some research. There seems to be a debate on whether to use decimal or integer as the price field. In case of where integer data types are used, the integer actually will store the price in cents. One argument for [...]