The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Heroku Engineer Engaged to Ruby
If you love Ruby so much why don’t you marry her? So on December 25th, he got down on one knee continue reading…
DCI: The King of the Single Responsibility Principle
I’ve just published another article on SOLID DCI. This one’s on SRP, but we need to redefine responsibility. Feedback welcome!
Tuning Phusion Passenger's concurrency settings
This article teaches how to tune Phusion Passenger’s MaxPoolSize and concurrency settings.
Preparing Machines for Workshops with Vagrant, VirtualBox, & Puppet
If you’re giving a workshop, I recommend checking out Vagrant, VirtualBox, and puppet or chef to create the workshop development environment.
Rails Translation Center Engine, translations the easy way
We at BadrIT have launched a Rails 3 Engine that developers can use to manage translations for their apps, you will not have to use the yaml files again, you can also use it as a community where users of your system can add and vote translations. [more inside]
WebSockets with Rails 4 and Ruby 2
I just wrote up a blog on how to use the excellent websocket-rails gem to build a simple Ruby 2 + Rails 4 realtime chat app and deploy it to Pogoapp. Here’s a live demo.
A Simplified Query Interface for Relationships in Active Record 4
I wrote about a little known change to Active Record queries in the forthcoming Rails 4 release that I thought people would be interested in.
Sign your gems with PGP
Remember the recent Rubygems.org vulnerability? We don’t want all that to happen again do we? But the responsibility lies partly with us, the gem developers. [more inside]
Webp-ffi - ruby wrapper for libwebp
I just finished first version of webp-ffi. For now it support encode png, jpg or tiff image to webp (with options, like quality, resize, crop) and decode to png. [more inside]
CLI + KISS = CLI.K
Aficionados of simplicity, allow me to introduce you to my new command-line interface option parser, CLI.K. Based on Michel Marten’s excellent Clap library, CLI.K takes the code a few steps further by supporting multiple options per definition, single letter “run-on” options and, clearly the most fetching of features, a simple call to the private Kernel method #cli handles it all.
Using ActiveModel::Serializers with DataMapper
Since Steve Klabnik released version 0.7.0 of the active_model_serializers gem and Ryan Bates has produced an excellent Railscast on the topic, I thought I would contribute a little post on using ActiveModel::Serializers with DataMapper. I hope you enjoy it. Please tweet any questions to me @tpitale.
kramdown 1.0.0 released - now under MIT license
I just released kramdown 1.0.0! Feature/bug fix wise it is only an incremental update but from this point on forward kramdown will be released under the MIT license! Enjoy!
football.db - Free Open Football Fixtures&More (Champions League, Bundesliga, World Cup Quali etc.)
I’ve extracted all football fixtures from the sport.db into its own database, that is, football.db. Note, all football fixtures are now plain text (and, thus, reuseable in any programming language). Use the sportdb gem to setup your database, reuse ActiveRecord models, etc. Events include the Champions League 2012/13, World Cup Quali, Bundesliga, and other. Anything missing? Add yours. Cheers.
basic_config: Makes YAML configuration a bit better
Try it out if you haven’t: basic_config. It’s very simple and unobtrusive.
What's new in Sinatra 1.4?
Want to know what’s coming in Sinatra 1.4? Check out my blog post.
Paloma 2.0 - Page-Specific Javascript For Rails Done Right
A new version of Paloma is out! [more inside]
I Wish Ruby Had Interfaces
Types have a bad reputation in the Ruby community for making code harder to read, and adding unnecessary ceremony. In this article I’d like to show that a type system done right can help make code more readable and toolable without constraining the expressiveness of the language. Or in other words, I will show how a type system can allow the flexibility of Ruby and the toolability of Java to coexist in one language. Read more.
Overcoming IE's 4096 selector limit using the CssSplitter gem
There is an annoying CSS limit in IE versions 9 and below, which leads to all CSS selectors beyond the 4095th to be ignored. Due to Sass (–> more selectors) and the asset pipeline (–> bigger stylesheets) this is especially a problem in the Rails world. This blogpost gives a little bit of background on the issue and introduces the CssSplitter gem, which helps Rails developers to split up their overweight stylesheets for IE compatibility.
Hound: Track your Rails models and create activity lists from the results
I’ve just built Hound. Hound tracks actions made on your Rails models and supports adding custom actions for easily creating activity lists for any of your models. It’s only just been released and it’s very simple right now but I plan on adding a lot of functionality down the road. https://github.com/injekt/hound
Hacking your bundle for fun and profit
André Arko of Bundler writes about little known Bundler tricks. Check it out here.
Faster, smaller and more beautiful web with WebP
An average page is now over 1300 kB in size and over 60% of that is in images… WebP provides 30-80% improvement over JPEG and PNG - latest news and updates from WebP team, and example Varnish/Nginx configs for WebP detection.
Method Signature You Can Sink Your Teeth Into
Nice intro to Ruby 2.0’s keyword arguments.
New version of gem lazy_caching
I have just released new version (v3.0.0) of gem lazy_caching. It contains a lot of great improvements. Check it now!