MetaSkills.net
Coding things under other things!

Database

Speaking At MADExpo

Over the past few months I have been actively working with both Luis Lavena and Wayne E Seguin to incorporate both TinyTDS and the SQL Server Adapter into the latest release of the Rails Installer for Windows. Like them, I firmly believe that Ruby's success is tightly bound to how well we can bring these tools to the Windows platform. So despite that I have no love for the Windows – I do want to see Ruby succeed and help...

Automating Heroku PG Backups

On December 1st, Heroku deprecated their bundles add-on in favor of their new PG Backups. Even though there are other solutions for automating backups using this new add-on, none of them met my needs. I like to have a daily DB backup history, just in case you find something bad that happened "n" days earlier. Below is a simple rake task suitable to place in your rails lib/tasks/heroku.task file. I'll explain some things I learned below when writing this. require...

TinyTds - A modern, simple and fast FreeTDS library for Ruby using DB-Library

I just finished the first cut of learning C extensions for ruby and I present The TinyTds gem. It is meant to serve the extremely common use-case of connecting, querying and iterating over results to Microsoft SQL Server databases from ruby. Even though it uses FreeTDS's DB-Library, it is NOT meant to serve as direct 1:1 mapping of that complex C API The benefits are speed, automatic casting to ruby primitives, and proper encoding support. It converts all SQL Server...

A MacPort/RubyODBC Update

TinyTDS is the upcoming de facto raw connection method for the SQL Server adapter. Please read the Using TinyTDS wiki page on the adapter for switching. No longer do you have to worry about compiling ODBC layers! I have changed my mind about the UTF-8 version of RubyODBC. Please read that section in the the rails 3 announcements for the SQL Server adapter. Quite a while ago I wrote a soup to nuts article on getting the full multi-ruby development...

Installing REE With The Snow Leopard SQL Server Stack

Today I noticed that Ruby Enterprise Edition 2009.10 was released and I have really been wanting to see if I could get the SQL Server adapter tested and running under it. I am really curious how the speed improvements might look and will share my results below. This article assumes that you read my previous guide titled The Ultimate OS X Snow Leopard Stack For Rails Development - x86_64, MacPorts, Ruby 1.8/1.9, SQL Server, SQLite3, MySQL & More as I...

The Ultimate OS X Snow Leopard Stack For Rails Development - x86_64, MacPorts, Ruby 1.8/1.9, SQL Server, SQLite3, MySQL & More

If you are interested in using RVM with a MacPort base for the SQL Server stack, check out this article. TinyTDS is the upcoming de facto raw connection method for the SQL Server adapter. Please read the Using TinyTDS wiki page on the adapter for switching. No longer do you have to worry about compiling ODBC layers! I have written an updated article on the MacPorts installation of the latest RubyODBC. It includes information pertaining to utf8 support. This guide...

SQL Server Adapter For Rails 2.2

So that about sums up what I've been doing for the past 4 weeks. A total rewrite of the SQL Server Adapter for Rails. On top of passing all the Rails 2.2.2 tests, which is MAJOR news, it includes tons of new features. Unicode column support, pessimistic locking, date/time column casting, DDL transactions and way more. On top of that. It was nice being mentioned on the rubyonrails.org website not for my first, second, but a THIRD time. Thanks Gregg!...

Plug It In Plug It In

I've been busy putting together some plugins form misc work. If you did not catch my latest article Jack has_many :things where I covered GroupeScope, by all means check it out. I've also just finished up a pretty solid backport of NamedScope that can be found on my Github page. It bills itself as a well tested complete back port for rails 1.2.6 and 2.0.4. One thing that has been a real help while I've been developing these plugins is...

Jack has_many :things

UPDATE: [12/06/2011] The GroupedScope gem has been updated for Rails 3.1. Many new features have been added with a few mentioned below. Check the project's readme for complete details. I am Jack's sofa, stereo and wardrobe... I make Jack's life complete. I reside in a ActiveRecord table called "things" and Jack is the only one that has the key. This is Jack's life, and it's ending one minute at a time. As rails developers, we have done this simple relationship...

My Own Soup to Nuts Recipe for Ruby on Rails on OS X

Tim Toady tells us that (There Is More Than One Way To Do It) and I am sure this is not the first and not likely the last blog post you will ever see that tells you the best way to install RAILS on OS X. Some people would just rather than go the simple path but I implore you, do it this way. Gaining the experience of compiling your own software will help you down the road when it...

Learn To Program in Ruby and Basic SQL

I've been learning to or "trying to learn" Ruby on Rails for a few months now and things have always kept me from finishing the book that I purchased from those great publishers at the pragmatic bookshelf. My problem has been that sometimes other work has gotten in the way, but mostly it was because I did not have the core understanding of the basics for building web applications. Especially in the areas of object oriented programming and database languages....

How To Setup a Simple MySQL Backup Script

Lately, I've been loving all things that can be solved by using RsyncX. It's my de facto backup utility and I just keep finding more and more tasks for it as each day goes by. It has become the hammer for all my system's needs. So when it came time for me to implement a nice little backup routine for the MySQL databases hosted here at ActionMoniker.com, it was the first tool I considered. My requirements were simple, I needed...