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.
rails_or gem released!
rails_or is a gem that Support && Add syntax sugar to #or query method in Rails 3, 4, 5. Usage: [more inside]
RealCodez: Gems Missing in Bundle Outdated, Part 3
In the latest screencast, we wrap up a PR that refactors and adds tests to contributor’s PR to fix a bug in Bundler 1.13. See all our screencasts and clips here.
Prototyping tabletop games with Squib
Squib is a Ruby DSL for prototyping tabletop games, used by hobbyist and professional game designers. We’ve just released v0.13, and we have a bunch of new tutorials walking you through it, as well as several of our own big-box and card games. Cheers!
Ruby Exception Handling - Primer for Dealing with Errors in Ruby
Whether you’ve been programming in Ruby for years or you’re a complete beginner, tracking down errors in your Ruby app is easier than you think. We walk through some basic ruby and rails error handling, and various ways you can automatically log and report your exceptions.
Optimal way of processing large files in Ruby
Few ways of processing large files in Ruby: [more inside]
Rails Security Checklist
Rails security checklist is working to become a community-driven resource to help security-minded developers. If you’re interested in this kind of thing please join in:
Language (flash) Card game 'language_cards' released! via @6ftdan
Command line game for learning languages in flash card style is here! Full internationalization and auto-import YAML card sets for adding your own flash cards. Currently implemented is Romaji to Hiragana & Katakana for learning Japanese. See the project at danielpclark/language_cards or simply “gem install language_cards”. You can contribute to the language files without any Ruby knowledge, but Ruby devs are most welcome!
Coverband 1.5 release, adds code usage density
This feature request has been 3 years in the making… Coverband originally supported production code LOC usage, but with various performance improvements it can finally support production LOC hit count. Find dead code and little used code on production.
Safe monkeypatching
Ruby is the language of monkey patching. It’s almost impossible to avoid it in a huge Rails app. And still, there are good and bad ways to add a monkey patch. [more inside]
Common Rails Idioms that Kill Database Performance
Many of the most common ActiveRecord idioms produce SQL which doesn’t scale well as your dataset gets larger. In this article I discuss three of the worst offenders and offer work-arounds. http://blog.honeybadger.io/common-rails-idioms-that-kill-database-performance/
Invisible Captcha - New release with Rails 5 support
New patch release - Invisible Captcha v0.9.2: a simple and flexible spam protection solution for Rails applications, based on honeypots. Link: [more inside]
Ruby: Stream processing of shell command results
Executing a shell command and then processing results can be an overkill for both performance and memory. Here’s one of the alternative solutions for executing and processing shell command results in a stream.
Raw SQL formatter
Made simple gem for easy raw SQL reading in development. Hope, you find it handy :)
Super simple ruby decorators
I wanted to have model decorators, accessible from anywhere but in separate namespace. [more inside]
How To Spy on Your Ruby Methods
What if you could find out what a method is doing? Using this built-in Ruby class you will be able to…
Google Assistant SDK gem
Google provides a Node SDK for its Google Assistant. However, I work primarily in Ruby so I’ve created the google_assistant gem. It’s functional, but I am currently working toward a 0.1 release, hopefully to follow up with a 1.0 release before long. https://github.com/armilam/google-assistant-ruby
[Screencast] Periodic Tasks with sidekiq-cron
Using a third-party add-on, sidekiq-cron, we can create periodic tasks to extend the functionality of sidekiq. https://www.driftingruby.com/episodes/periodic-tasks-with-sidekiq-cron
My book 'Learn Ruby on Rails' free on Google Play
The first book in my series Learn Ruby on Rails is now available for free on Google Play. I’m making the book available as widely as possible. It is also free on Leanpub or Softcover, thanks to support from a Kickstarter campaign. If you’ve got a friend who has made a New Year’s resolution to learn to code, the book could be a good place to start.
How To Time Travel Using ActiveSupport TimeHelpers
If you need to test “time” literally. Here’s an alternative to TimeCop for testing time-related validity logic in Rails.
Event sourced domain objects in less than 150 LOC
Some say: “Event sourcing is hard”. Some say: “You need a framework to use Event Sourcing”. Some say: … Meh. You aren’t gonna need it. Learn how to build event sourced domain model starting with just a PORO object. [more inside]
tty-editor initial release
tty-editor allows to open a file or text in in the user’s preferred editor.
Ruby Survey
I’ve been thinking a lot lately and was curious to get some feedback from other Ruby developers, past or present. If you have time, I’d love to get your feedback:
Asynchronous programming in Ruby
In this blog, I have executed database queries asynchronously same as Node.js
pluck_all gem
pluck_all: Pluck multiple attributes in Rails 3, 4, 5, and return data as hash instead of only array. [more inside]