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.
Locally Sourced, a magazine of technical writing
I’ve launched a Patreon campaign to support Locally Sourced. The center of each issue of Locally Sourced will be an article about 15 to 20 pages long (like a book chapter), covering some task or tool in more depth than a blog post. The topics will often be about Rails and JavaScript, and particularly about testing. Please check it out at https://www.patreon.com/noelrap.
Let's build a simple RSS to email digest script
In our office we need to be able to easily pull lists of blog posts into a simple HTML email format. I wrote a little script to do it, and wrote it up in a post: http://blog.honeybadger.io/lets-build-an-rss-to-email-digest-script-with-ruby/
Easy SEO metatags with Rails 4
Having the right SEO meta tags generated for your website is a must have nowadays, and setting them up is easy and fast in Rails with the Metatags gem. Here’s how we do it.
Preloading Rails scopes
Rails’ scopes make it easy to find the records you want. But you can’t really preload a scope. So if you’re not careful, your scopes will turn into N+1 queries, which turns into slow controller actions. How can you keep that from happening?
ANN Mustache v1.0.2
An update to the Mustache gem was just released with some improvements:
Over-engineering?
Is your code over-engineered or well-factored? We like to think that we know how to structure our code. But as will all things related to software development, there are trade-offs and decisions to make.
List of Best Ruby Gems for harder, better, faster, stronger web development
New to Ruby? This Ruby Gem Guide will show you how to install and work with our favourite local gems via Prograils.
Lotus - one year later
My review of lotus, a wonderful ruby web framework
Strategy before details: Keep up with Rails security + guide free until June 30
This new Rails security guide is about strategies before going into the details. And it will be available for free here before the release on June 30. It will help you creating a system for how to keep up with web app security and to introduce top security with just 10-30 minutes of work every day.
Ruby Productivity Scripts : Simple Whois Client
As web developers we have thousands of ideas for web applications than can make us get rich quick. We buy domains in bulk when we get too excited. Why do we need to Google for the details? Why do we put up with Captchas? Why not write our own scripts to get the details from a terminal? Read Ruby Productivity Scripts : Simple Whois Client to learn more.
How OpenStruct can kill performance
I was looking into moving some data out of hashes and into objects, and decided to compare the performance of classes, structs, hashes and openstructs. The results were pretty interesting: http://blog.honeybadger.io/how-openstruct-and-hashes-can-kill-performance/
Always Use Double-quoted Strings in Ruby
If you’re nerdy about what quote style you use (single or double), especially in Ruby, give this a read and tell me what you think.
whatson gem - Use $ beerfest to list upcoming beer festivals on command line
Hello, for fun I’ve added another dataset to the whatson gem that lets you list upcoming beer festivals from around the world. Ever wonder how many days to the next Oktoberfest? Just type in your shell: $ beerfest The command will fetch the beerfest event calendar page (from the intertubes) and print out: in 9d Ottakringer Braukultur Wochen, Thu-Wed Jul/2-Sep/2 (63d) @ 16., Ottakring › Vienna › Austria; in 88d Oktoberfest ("Die Wiesn"), Sat-Sun Sep/19-Oct/4 (16d) @ Munich › Upper Bavaria ... and so on. Cheers. Prost. Kampai.
To Serialize Or Not To Serialize: ActiveModel Serializers
Structuring data can be complicated, and on the web, everything is just a game of passing data back and forth. When it comes to serializing data into a JSON format, there’s one gem that can make your life infinitely easier: active_model_serializers! This blog post highlights when and how to implement a serializer in your Rails app, and how to customize it to fit your needs.
ANN Lotus v0.4.0
Features: additional architecture, database migrations, HTML5 form helpers, CSRF Protection, Force SSL. New Core Team member, Rails Girls Summer of Code and Guides! Read more
Shortcuts for navigating nested associations
How do you access non-adjacent models while avoiding N+1 problems? Find out in my latest post - shortcuts for navigating nested associations.
Drat! - Ruby has a double splat
Continuing from the single splat *, we’re looking into the spoils and tricks of ** in your Ruby code. There’s probably stuff you didn’t know here either.
LinkThumbnailer
LinkThumbnailer helps you extract meta informations from a given URL such as title, description, images and much more. It embeds a powerful algorithm to rank and return you the best images and description out of the website. It comes with a great documentation and a live demo.
Static Frontend Apps in Pure Ruby
In episode 5 I explore ways to make static frontend apps in Ruby using Opal and Rake.
Using Sunzi Gem
Sunzi is the easiest server provisioning utility designed for mere mortals. If Chef or Puppet is driving you nuts, try Sunzi! Here is step-by-step instructions on : Provisioning a Server using Sunzi
Bitwise hacks in Ruby
A brief tutorial on twiddling bits in Ruby: http://blog.honeybadger.io/bitwise-hacks-in-ruby
Filterrific: Filter, search, and sort your ActiveRecord lists
Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists. It comes with awesome documentation and a live demo.
A gem to sync your CHANGELOG to GitHub’s release notes
I like GitHub’s Releases UI, but keeping it updated in addition to maintaining a CHANGELOG is tedious. So I created a gem called “chandler” to do it automatically. If you maintain a gem, just add chandler to your Rakefile, and rake release will now update GitHub’s release notes in addition to tagging and uploading to rubygems. Chandler also works interactively on the command line. Give it a shot!
Intro to the Docker Stats API with Ruby
The Docker Stats API provides a ton of information about running containers. See how easy it is to tap into key performance info (CPU, Network In, Network Out, etc..) with a couple Ruby scripts. This post walks thru the basics.