It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...

So you're switching to PostgreSQL from MySQL? Here is some help... General hints on PostgreSQL \? opens the command overview...

makandra dev

The mysql2 gem in version 0.3.13 might break while compiling on older patch releases of Ruby 1.9.3 within rvm:

Do not use .rvmrc files to specify Ruby version and gemset configuration any longer, it's deprecated and not considered...

After running bundler / gem install I could not load nokogiri lately. It died with cannot load such file -- nokogiri/nokogiri.

Ruby's private keyword might do a lot less than you think. "private" does not apply to class methods defined...

makandra dev
rubylts.com

RubyLTS is a long term supported fork of Ruby 1.8 that will continue to receive security updates for the forseeable...

smartinez87.github.io

The new exception_notification has awesome options like :ignore_crawlers => true and :ignore_if => lambda {...

...}. These options should be helpful...

Consul 0.9 comes with many new features to optimize powers that only check access to a given record. e.g. Power.current.post...

jimneath.org

The linked page lists and explains global Ruby "dollar" variables, such as: $: (load path) $* (ARGV) $? (Last exit status) $$ (PID)

Ruby 1.9 brings a shorter way to define lambdas using the -> operator: twice = -> (x) { 2 * x } twice.call(5) # => 10

makandra dev

Next time you have to do more than trivial CSS changes on a project, you probably want to have live...

Did you know you can do in-place batch processing with plain ruby? The following script will in-place replace...

The Rails secret_token must be unique for each application and any instance of it. If not, someone could exploit...

Merge requests are often rejected for similar reasons. To avoid this, before you send a merge request, please confirm that...

Do it like this: attribute :active, Virtus::Attribute::Boolean Long story In Virtus you define attribute with their type...

github.com

Essential backports that enable many of the nice features of Ruby 1.8.7 up to 2.0.0 for earlier versions.

The Ruby on Rails security list archive can be found here: http://groups.google.com/group/rubyonrails-security You can subscribe to this mailing...

robotlibrarian.billdueber.com

As Bill Dueber has on his blog, you can call rvm in the shebang to select a Ruby version like...

When you download or upgrade RVM it has a hardcoded notion which patch level it considers to be "1.9.3".

tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...

makandra dev
aaronlasseigne.com

All Rubyists should be familiar with the common definitions for include and extend. You include a module to add instance...

nt.ntnu.no

yaml4r is a juxtaposition of yaml documents and their Ruby couterpart. Thus, it does a great job as YAML-doc...

makandra dev

Ever wondered about the difference between def and define_method? Turns out there are three implicit contexts in Ruby. def...