.:: An exploration of exercise plans, weight loss and better workouts. ::.

" Searching begets purpose.. So we keep looking for the better workout plan, the better weight loss strategy, the better version of ourselves.. "

Choose a Topic:

Archive for the ‘Rails’ Category

Wed
4
May '11

Testing a local gem with Rails 3 and Bundler

So you’ve created a wonderful gem that you’d like to share with the world. You’re doing last minute tests by creating a sample application. So how do you point your Gemfile at your local, unpublished gem? Bundler conveniently let’s you specify a path : gem ‘turkee’, :path => “/Users/jjones/Projects/new_gem” The important thing to remember is [...]

Fri
14
May '10

Ruby 1.8.7 Mysql::Error: Client does not support authentication protocol requested by server

Upgraded to ruby 1.8.7. Went to the script/console, executed a basic activerecord find command and received the following error : Mysql::Error: Client does not support authentication protocol requested by server. From the accompanying stack trace, it’s obvious that ActiveRecord is looking at the old mysql adapter that comes packaged with ruby 1.8.7. from /usr/local/lib/ruby/1.8/mysql.rb:453:in `read’ [...]

Fri
16
May '08

Managing Multiple Images for Multimodel Forms

So, I have this web app that I am creating for a friend that helps with managing inventory for eBay auctions. When a user created a product, my intention was to allow them to upload as many images as they would like to be associated with that product. When they would go to edit the [...]

Tue
13
May '08

Recording Type Definitions From Unit Tests For Autocompletion

I just got done reading Steve Yegge’s “Dyanmic Languages Strike Back”. He notes that one of the perceived problems with dynamic languages is the lack of tools, (he notes specifically the autocomplete feature). While the thought of type declarations or any sort of annotations makes me cringe, is there any useful type data that could [...]

Sat
1
Mar '08

Rails Migrations – Command Line Power in 2.0

I absolutely loves Rails 2.0 and the command line conveniences it provides for the RESTful scaffolding and models. Here’s a couple of tricks to generate a migration to quickly to add/remove columns from an existing table. Assume you already have a table called ‘Users’. You would like to add a column called ‘title’ and another [...]