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.
Design is Refactoring: Replace array with object
Refactoring, primitive obsession and method parameters. This week it’s time to look refactoring away Arrays and Hashes
Object Oriented Design Basics
How to apply Open Closed Principle to FizzBuzz and eliminate if-else-elsif statements.
Using Struct and OpenStruct
Sometimes you just want an object that can store some data for you, the struct class is very useful in this situation.
Awesome Ruby Events - Summer Update (Incl. Italy, Vietnam, Colombia, etc.)
Hello, I’ve updated the Awesome Ruby Events list that collects Ruby events (meetups, conferences, camps, etc.) from around the world. New entries include: Ruby Vietnam, RubyDay Italy, ROSSConf Berlin, RubyConf Colombia and more. Full list. Anything missing? Contributions welcome. Cheers.
RubyDay 2015, the Italian Ruby conference
On November 13th, 2015 the RubyDay will be held in Turin. It’s the only Ruby conference held in Italy and it’ll be a great place to meet other developers and companies, learn some new tricks and have fun altogether. If you feel like having a talk the Call for Papers is still open!
React and CoffeeScript (cjsx) on Middleman
React and Middleman are not a common pair, but when working entirely on the front-end and digesting a Rails API, it’s really advantageous to stick with a stack you already know. The only viable alternatives are vanilla everything or a js stack. This tutorial will get you up and running so that you can use React with CoffeeScript compiled by middleman and deployed on heroku.
Ruby-asterisk - Asterisk Manager Interface in Ruby
A few years ago I wrote a library to interface a ruby application with asterisk, its name is ruby-asterisk (original huh?). I wrote a post to introduce it, hope you enjoy it!
Gradual engagement with Rails
When a visitor reaches your website, you might want to allow them to use some of the functionality of your app without creating an account. This UX technique is called gradual engagement. In this post, we will walk through adding lazy registration to a simple app.
Only $584 away from bringing ten new contributors to Practicing Ruby
I’m trying to raise some money to pay Ruby community members to produce open source learning materials via Practicing Ruby. If we can rustle up just a few more backers, I can start the search for contributors as early as today. Read more
PStore: Ruby's Lesser Known Key/Value Store
I wrote a blog about “PStore”, a feature of Ruby that I feel doesn’t get enough attention despite its usefulness.
Demystifying @tenderlove's homeopathic code optimizations
At the Keep Ruby Weird conference, Aaron Patterson gave a hilarious keynote talk where he talked about homeopathic code optimizations. Read on to find out how that impossible piece of code worked:
Debugging Memory Leaks on Heroku
I recently ran into a problem that looked like a memory leak on Heroku, it took some time to explore and find the root cause of the issue. For a spelunk on debugging memory leaks on heroku:
Sandi Metz - Nothing is Something
Great talk by Sandi Metz at RailsConf about identifying hidden concepts in your code. Nothing is Something.
Easy Docker event monitoring via the docker-api gem
A howto on monitoring docker events via the docker-api and statsd-ruby Ruby gems.
The Ruby Community: An Introduction
A Sitepoint article on the Ruby Community dealing with the Basics, Primary Community Members, Testing, Frameworks and Rake. Read more
active_loaders: preload SQL data for your serializers (AMS) more easily
active_loaders is a gem that takes care of automatically doing “includes” for you when you’re using ActiveModel Serializers, and then also allows you to write queries for more complex preloading logic in a reusable way. It uses your serializer as a manifest to preload the data you need from the DB. It supports ActiveRecord and Sequel. Read more
Get Freaky: Browse and download conference videos from the command line.
get_freaky is a ruby gem I built to make it easier to download videos from confreaks.tv. I built this tool because I was interested in saving conference videos from confreaks for viewing later, like when I have time to kill on busses and planes. It could also allow you to do things like automatically download a new conference video once a day or once a month with a cron job or something. Read more
The ten most widely read contributed articles in Practicing Ruby
See this list of articles for a good sampling of what Practicing Ruby’s guest authors have been up to over the years.
Code Dojo: Twitter Top Trumps (part 2)
Attempting to build an app in two hours that’ll let us compare two users Twitter followers:
avgbm gem: Adds Benchmark.avgbm
performs Benchmark.measure multiple times… discards highest/lowest times and averages the remaining times.
Unless Or Negative Expressions On Conditionals
It’s amazing our ability to tell histories by negative conditionals. Read more
CanCanCan: The Rails Authorization Dance
Meet CanCanCan, a flexible authorization solution for Rails. This project started as CanCan authored by Ryan Bates, the creator of RailsCasts. However, a couple of years ago this project became inactive, so members of the community decided to create CanCanCan, a continuation of the initial solution.
Use TZInfo to send timely emails
If you’ve ever needed to send emails at a specific time in different time zones, TZInfo is a great tool to use.
Regular expression matching in Ruby with String#[]
Today I discovered that you could do "foobar".[/f../] to extract “foo” from the string. Here’s a short post explaining how to use String#[] to match regular expressions.