Writing Ruby Gems – Part 4: Setting up Test::Unit

[This is the 4th part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Publishing to Rubygems.org.] So far in this tutorial we haven’t written any code that would be useful in solving Sudoku. The reason is [...]

Writing Ruby Gems – Part 2: Adding some code

[This is a part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Previous post - Gem specifications.] In the previous post, we saw how to set up the gemspec and also installed the empty gem into our rubygems directory. [...]

Writing Ruby Gems – Part 1: Gem specifications

[This is the first part of a series of posts about writing a Ruby gem. The introductory post about this tutorial contains links to each part of the tutorial. Next post: Adding some code.] The first thing to do when creating a new gem is to create a file called gemspec that contains information about [...]

Writing Ruby Gems

Creating a Ruby gem is a lot easier than it seems. Many tutorials about writing gems recommend using something like Jeweler or Hoe to create the structure of the gem for you. Using such tools will make it much easier to get started with a gem, but building a gem from scratch will help you [...]

Rubyconf India 2011 – Live Blog

I haven't been able to post updates here regularly enough on the afternoon day 1, so I don't think there's much point in having a separate post for day 2. I'll be posting updates from day 2 here and this time I'll post reverse chronologically. Day 2 5.00pm Nick Sieger is about to present the [...]

Review: The Rails 3 Way (Obie Fernandez)

Often enough in the Rails community you hear people saying that following the Rails way of doing things will make life much easier. As the title suggests, this is the book that teaches you how to develop Rails 3 applications in "the Rails way". This book is not for beginners. Readers should at least know [...]

Review: Eloquent Ruby (Russ Olsen)

If you are new to Ruby programming, Eloquent Ruby should be the book you read right after you finish your introductory Ruby book. It's not a beginner's tutorial, but with a little background on Ruby, it would be easy to follow. This is one of the better programming books I've read. It has plenty of [...]

Using Haml with Rails

I have always used erb for my Rails templates, but today I decided to try HAML. I was pleasantly surprised by how little work there is to get it to work. First add the following line to the Gemfile and run bundle install. gem 'haml' Let's suppose this is the ERB code for the application [...]

SpellingBee gem released

I came across Peter Norvig's article How to Write a Spelling Corrector the other day and felt that packaging it as a ruby gem would be a nice way to learn how to create gems. The gem gives you a SpellingBee class that can suggest corrections for mis-spelled words based on the frequency of words [...]

Ruby and rails need to shed that “arrogant” tag

When I entered the world of ruby, I knew nothing about it. I was hired to develop web applications, and it was after I started working that my employers chose ruby on rails as the platform for the project I was to work on. I never had to make a choice about what language or [...]