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.
Documenting Ruby command-line apps (pdf download)
Very few people would be able to use your commandline app without proper documentation. Users would have to read and understand the source code to know what options and commands the app provides, what the options mean, and what arguments the app accepts or requires. If you intend to make the app available to others and use the app multiple times periodically, for a long time, you must document your app. Luckily, there’s a standard for building cli apps that include the right features and proper, well-formatted documention.
PersistentOpenStruct: a faster OpenStruct
Addressing a situation where we wanted to use OpenStruct as a flexible data container but didn’t want the awful performance, I put together a faster version which defines methods on the class rather than defining singleton methods on the object. This gem is ideal for situations where you need flexibility at runtime, but you’re basically using the same set of keys again and again. It’s available on RubyGems as persistent_open_struct, and you can learn more at the GitHub repo and on my blog.
How can you deliver content from a Rails app as fast as a Statically Generated Site
Many developers will suggest you should just try Jekyll or other similar tools to generate a static HTMLs and deploy to S3. But many times we want to have Rails features for a more robust application. But you don’t have to live with slower requests, you can deliver content from Rails as fast as with a static generated website without leaving Rails as I explained in my article
How to dispel Ruby magic and understand your gems
Most gems aren’t doing that you couldn’t. It’s just Ruby code. Sometimes it’s complicated Ruby code. But when you explore that code, you’ll begin to understand where that magic comes from.
ru_bee spell check for Ruby String
A gem that checks a Ruby String for misspellings. Only english for now with additional languages to come. [more inside]
Idiosyncratic Ruby: Episode 17-20
The latest of I.rb: The ruby -n command-line option, how to init and when to use structs, reserved symbols, and an overview of the standard library!
So what's the deal with refinements, anyway?
Confused about what “refinements” are? I’ve published a video and article introducing this somewhat controversial Ruby feature, using a practical example.
Passenger now provides Debian 8, Ubuntu 15.04 and Red Hat packages
Passenger now provides Debian 8, Ubuntu 15.04 and Red Hat packages. This makes Ruby deployment easier than ever. [more inside]
How To Integrate Clickatell In Rails Application
When it comes to sending an SMS using Ruby on Railst, there are two approaches you can take. The first – and more complicated – is to use your own hardware and something like the ruby-sms library to communicate with the hardware.
An example of using real life React app with Rails API
Flux/Flummox, React/Router, Immutable, Webpack, Babel on Rails Can be found on GitHub [more inside]
local-subdomain: for working with subdomains on localhost
Today I’ve just released version 1.0.0 of my latest gem local-subdomain offering subdomain support for your development environment, out of the box. [more inside]
12 Gems for Quicker and Easier Software Testing
Here’s a handy list of gems that will help you with automation software testing.
FizzBuzz in Ruby & Elixir
My take on solving “FizzBuzz” in Ruby & Elixir, and talking about some of the differences between the two languages.
RubySteps podcast w/ Hannah Howard
After studying computer science in college, Hannah Howard found herself burnt out of tech at the ripe old age of 22. She spent the next ten years focused on education and social progress, before making her way back into programming.
Idiosyncratic Ruby: Episode 13-16
You can use episodes 13-16 to explore Enumerable’s slice_*, initialize local variables in uncommon ways, create string literals in even more uncommon ways, and what to avoid!
The Secret Life of Your Database, Part 1: Migrations
Have you ever looked closely at a migration file and wondered what’s really going on? This post unpacks the secret life of your Rails database, highlighting the differences between the up, down, and change methods and irreversible migrations.
Using CoffeeScript to Trigger Click Events
In part three of this multi-part series on building a fully functional calendar in Ruby, we will be adding some CoffeeScript and Rails to create and render events to the calendar. Ir runs a little long, so I will have to do another episode to make the sql query more efficient. [more inside]
Change terminal colorscheme depending on hour of a day (flux-like functionality)
Not really about ruby, but about something we use on our daily basis - shell. Tutorial how to make your terminal change colorscheme automatically based on time of the day.
ProcMe: DRY and handy blocks for your arrays
I’ve recently released a small procme gem. It is intended to simplify and DRY tasks like “sort array by several attributes of each object”, “filter list by item attribute values” and so on. It seems to be small and nice addition to Ruby’s syntax, take a look.
Handling Randomly Failing Cucumber Scenarios in CI
I just published a post answering on question how to deal with randomly failing Cucumber tests when it’s blocking your deploy? Take a look »
2015's Ruby Heroes on The Changelog
We had a fun roundtable discussion with all 6 of this year’s Ruby Hero Award winners. Have a listen!
Disable unsafe rake tasks in Rails production environment
I wrote a simple rake task that raises an exception when you try to run dangerous rake tasks like rake db:drop in production. Read the post here:
Increasing test coverage of a Rails controller with mutant [3 minutes video]
There are not many examples showing how to use mutant within a Rails app. I decided to record this short video (3 minutes) to show how it can help in everyday work. [more inside]
Ruby Gem for Aptly (aptly.info) API. Apt repo manager
Hi All, I put together this Gem to interact with the Aptly API ( http://aptly.info ). This is my first Ruby Gem, so any advice or feedback is welcome and appreciated. [more inside]
Lightweight Rails app monitoring via StatsD
Announcing the scout_statsd_rack gem: drop-in Rails monitoring via StatsD and Rack Middleware. See it in action.