Andrew Chalkley the (Micro) Blog

How to Use RVM: Ruby Version Manager

secretmonkeyscience:

Click to Play Video
How to Use RVM (Ruby Version Manager) - Screencasts.org

Show Notes

In our Ruby developer career there may come a time when we have to deploy our app with other versions of Ruby. We may also take a fancy to implementations such as MacRuby, and want to try them out. However, installing many different versions of Ruby on…

Via Secret Monkey Science

Configuring ActiveRecord in Sinatra

We’ve just released another Sinatra screencast on configuring ActiveRecord in Sinatra applications.

Configure sinatra-activerecord gem to use custom database

Enjoy!


Building a URL Shortener in Ruby with Sinatra

We’ve just released a free screencast to show you how to build a URL shortener with ActiveRecord and Sinatra.



We’ve just released an Introduction to Sass on Screencasts.org.



Ruby on Rails 3 Training Course

I have updated my course at Skills Matter and it now covers Ruby on Rails 3.

Check out the course description and book now!


Introducing RubyHelpers

I am pleased to announce RubyHelpers gem.

When building lightweight Ruby apps in Sinatra and the like, I often need some extra functionality that Ruby doesn’t have baked in. I end up repeating snippets of code hear and there. I thought I’d bundle it in a gem for my own use and contribute it to the Ruby community.

I have extended Object to include the blank? similar to that found in Rails. For example “”.blank?, nil.blank?, {}.blank?, [].blank? etc

I have extended String to have to_html to use RedCloth to convert textile to (X)HTML. For example “h1. *Hello World*”.to_html would produce “<h1><strong>Hello World</strong></h1>”

I have extended Hash to have dot notation to access values via keys and to have {key}_exists? method too. For example person.first_name instead of person[“first_name”], person.phone_numbers.office person.phone_numbers.mobile_exists?

The Hash extension is really handy after parsing a JSON object. It feels so much nicer to access values via dot notation.

So start using it in your projects:

sudo gem install rubyhelpers

Check out the docs and contribute other RubyHelpers on good old GitHub.




Introducing Revver4R

Here is my first RubyGem and Rails Plugin, Revver4R. A simple Ruby way of grabbing videos from Revver. Check it out on my github account.

Enjoy Revver for Ruby!

P.S. It’s realised under the MIT license


11
To Tumblr, Love Metalab