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.
Posts can now be "reported" to the moderation team
I want to thank the many of you who have insisted time after time that a “report this post” feature was needed on here. We now have one! It’s still in testing, only on front page posts, and only available to logged in users for now, but it sends a notification to the team to review posts that may be spammy, offensive, off-topic, etc :-) Read more
Postgres vs Elasticsearch Performance: Numeric Statistics
Though brief, this post details the performance differences between using a Postgres database and Elasticsearch 5 to retrieve statistics for an indexed numeric column. Spoiler: One of them is a hell of a lot quicker than the other. Read more
Dockerizing Ruby Applications and Effectively Testing Them
Docker provides a variety of features that we can leverage to test any kind of application, including a Dockerized Ruby on Rails application. Read more.
Rails DB gem was updated
Hello, please check the latest update on rails_db gem Read more
An Easier Way to Think About `self`
Ruby’s self method can seem arbitrary, but there is an underlying structure to its behavior. When you understand it, not only will your own programs make more sense, but so will many advanced Ruby techniques which may have previously been shrouded in mystery. http://www.rubyletter.com/blog/2017/01/24/understanding-ruby-self.html
New version of billing.insitu.tools deployed
Hi everybody. I’m proud to announce that I’ve deployed a new version of my RoR based Invoicing solution for freelancers. Its available at Read more
Benchmarking a Go AI in Ruby: CRuby vs. Rubinius vs. JRuby vs. Truffle – a year later
After a first run ~13 months ago I thought it was time to do a new run and see how fast our contestants have gotten since the last time! especially now that Ruby 3x3 is a thing, it asks the question how much faster are the different implementations as compared to the Ruby 2.0 baseline. Included Rubies are TruffleRuby, CRuby/MRI, JRuby and Rubinius. Check out more in the blog post!
Simplifying Kafka for Ruby apps
Even with a client library, Kafka is unwieldy to manage and benefits greatly from a common framework with familiar concepts Read more
gem for flash messages
Fun and cute flash messages for your Ruby on Rails application. Easy to use.
Ruby Coercion Protocols Part 2
What’s the difference between #to_i and #to_int? How to sum two value objects? Let’s learn Ruby Coercion Protocols in depth.
Making sense of ActiveRecord joins, includes, preload, and eager_load
Like a pair of jumper cables, ActiveRecord’s joins, includes, preload, and eager_load methods are incredibly useful, but also very dangerous when used incorrectly. Knowing when and where to use each approach - and even when to combine them - can save you considerable trouble as your app grows.
Rendering Ember components from Rails
A nice guide on all the available ways to integrate Ember with Rails.
[Screencast] Random Ruby Tips and Tricks
A collection of different Ruby tips and tricks. Hope you find some of them useful! https://www.driftingruby.com/episodes/random-ruby-tips-and-tricks
ReadSource 0.2.4 released!
ReadSource is for reading method source code and now features support for inline methods, an attr? checker, and the ability to open method source code directly into a VIM server instance without disturbing the current Ruby process. read_source
Elixir for Rubyists
On the surface, Elixir and Ruby share a similar syntax. This familiarity may at first hide the striking differences between the two languages. Read my gentle introduction for Ruby developers intrigued to learn more about Elixir. Discover the language, created by José Valim, that took the Erlang virtual machine (BEAM) and put a sensible face on it.
Small steps to DRYer RSpec
The blog post shows several tricks/code snippets for making your specs more DRY (and preferrably one-line). It mostly takes approaches of rspec/its gem a bit further.
tty-file v0.2.0 release!
The new tty-file adds new powerful ways to work with directory contents by using methods such as create_directory and copy_directory. You can also easily create checksums for files and strings by calling checksum_file. Enjoy!
Using Docker For Development
I’ve written an article on using docker for development in Rails. This is part one of my Docker series.
Rails + Postgres Array + ANY LIKE
Ruby on Rails has a good support for Postgres Array type. I really like using this feature when creating a separate database table sounds like over-engineering. In this short post I want to share my solution for the following problem: “find a record for which any of its tags contains a given string”.
google_assistant gem can get user details
The google_assistant gem makes it easy to create Google Assistant actions in Ruby. It has hit v0.2, which brings the ability to request details about the user: their name, their zip code, and their precise location.
FXRuby Enhancement 0.1.0
I’ve added component reuseability and and easy way to deal with data-targets, and more. Oh, and there’s more documentation. https://github.com/flajann2/fxruby-enhancement/blob/master/README.org ‘Live’ example code can be found at: https://github.com/flajann2/rubyneat-panel/tree/master/lib/rubyneat-panel
How To Test Ruby CLI: The Setup
One of the most difficult tasks I met during Hanami development is to write integration tests for the Command Line Interface (CLI). This challenge required a deep knowledge of the Ruby toolchain.