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.
Ruby 2.5 prints backtrace and error message in reverse order
Ruby 2.5 prints backtrace in reverse order (stack frames first and error last) if STDERR is unchanged and a TTY. This blog post explains it in detail.
kitty - CryptoKitties Offline Genes Reader 'n' Mix Genes (Matron+Sire) Reporter
Hello,
I’ve put together kitty - a new command line tool for CryptoKitties and Copycats - free and open source in ruby that works offline (use datafiles in .csv). 1) Kitty Genes Reader / Report - Pass in the id (e.g. 1, 43, etc.) of the kitty to print a genes report. Example:$ kitty 1. 2) Kitty Mix Genes (Matron + Sire) Report - Pass in two ids for the matron and sire kitties to print a mix genes report. Example: $ kitty 2 43. Enyoy. Cheers. Prost.
Microservices for Startups: An Interview with Stephen Blum of PubNub
An in-depth interview with Stephen Blum of PubNub on how they use Microservices. PubNub provides connectivity for over 350 million mobile devices, which is greater than the population of the United States with over 2 trillion transactions going over our network every month.
RabbitMQ is more than a Sidekiq replacement
I’ve had gripes with Sidekiq because of which I switched to RabbitMQ. Here are my thoughts and experiences after a year of using it in production. [more inside]
Geet - GitHub commandline interface
The geet tool allows to perform the most common operations (PR handling, issues handling, gists creation, milestones listing etc.) entirely via commandline. [more inside]
HABTM to has_many :through
In certain cases, has_many :through permits to declare the join table as model. And so, in order to operate (filter, sort, allow, reject, etc..) at a join table level.. see more
Something about and beyond the code: Ruby on Rails dev house behind the scenes.
A close look at how Ruby on Rails software house runs. Guidebook for those who are interested in working for or with a development agency or those who want to run a software house. [more inside]
Why Service Objects are an Anti-Pattern
Adding to the ongoing conversation regarding service objects: not only do I think better solutions exist than service objects in the majority of cases, I maintain that service objects are an anti-pattern which indicates a troubling lack of regard for sound object-oriented design principles. Find out why with detailed code examples.
Upgrade Rails from 4.2 to 5.0
The latest follow up to our Rails upgrades blog post series.
Introducing Rack::Reducer — map URL params to data filters, in any Rack app
Rack::Reducer is a new gem for safely mapping URL params to functions that filter data. [more inside]
Implementing a basic debug mode for Ruby CLI
In my latest article about debug mode in CLI Ruby programs I am mentioning how to print backtraces on demand, incorporate a logger that does nothing when does not need to and how to directly flush all stdout to the underlying OS without buffering it up.
[Screencast] Encrypted Credentials in Rails 5.2
In this episode, we take a look at the Encrypted Credentials of Ruby on Rails 5.2 and how we can patch it so that we can use other YAML files like a development.yml and test.yml. https://www.driftingruby.com/episodes/encrypted-credentials-in-rails-5-2
Embracing composability: be_json RSpec matcher
Describing another attempt to create good RSpec matcher, as well as some theoretical examination of RSpec composability patterns.
Regexp Implementation in Ruby
A closer look at how ruby implements regular expressions. This blogpost covers the following topics: [more inside]
unique_validation_inspector 0.3.0
New version of UniqueValidationInspector is released - a task that helps you find unique validations in models that do not have proper DB indexes. [more inside]
Practical Differences between Working in Ruby and iOS
Developing iOS mobile apps and server-based Ruby applications is different on many levels. In this blog post, I will present a high-level overview of different aspects of day-to-day working in these technologies. [more inside]
Gotchas with Rails System Testing
This blog post will help you to understand some of the issues which I faced while adding system tests in my Rails application.
FasterPath 0.3.1 Released!
FasterPath 0.3.1 has just been released. This is the project where I rewrote one method from Ruby into Rust and made my Rails sites pages load more than 30% faster. Now we’re up to 15 optimized path handling methods with performance gains on individual methods up to around 90% faster. This is the first release with Binary Releases precompiled and I would like your help to test this feature out. Looking for Mac and Linux system tests, Windows support is coming soon, and you can help with this issue #143. [more inside]
CryptoKitties (Copycats) Cattributes Gene Reader - Inside the CryptoKitties Genome
Hello, I’m rebuilding the cryptokitties off the blockchain in ruby called copycats. Want to know more about your kitties genes / genome? Use the KittyReport class to build a certified page in text with formatting in markdown - Example Kitty #100000. For all traits (fur, pattern, eye shape, highlight color, …) see the Traits Charts (in Kai/Base 32 Notation). Cheers. Prost.
gem "GemsAssetsWebpackBridge"
The gem generates a bridge-file with Webpack aliases which you can use to get an access to ruby gem assets. This gem helps to migrate your Rails app from Sprockets to Webpack, in case if you have split already your monolith Rails app into gems and stored assets in these gems and you look for a way how to teach Webpack to use your assets from ruby gems.
Get your Rails performance metrics 📈 into Chrome with the `server_timing` gem
View performance metrics (time spent in ActiveRecord, Redis, etc) for each of your Rails app requests in Chrome’s Developer tools with the server_timing gem. Production Safe.™
Use Ruby Objects to Keep Your Rake Tasks Clean
In this article, I talk about how to keep ancillary pieces of your infrastructure fairly clean and minimalist. In terms of Rails, one place I’ve seen where it’s easy to end up with “bags of code” that aren’t really structured or straightforward to test are Rake tasks. Let’s look at a Rake task I recently refactored on a client project. In the spirit of DHH’s On Writing Software Well series, I’ll be demonstrating by looking at live production code.
The 2018 Rails Survey is Live!
For the last 10 years, Planet Argon has surveyed the Rails community to learn more about the state of the framework. We’d love if you participated in the 2018 survey and shared with your peers! Complete the survey here:
log_analyzer was updated with PDF/CSV support
Generate performance report of your Views based on your log file (export to CSV/PDF added). Looking for a contributor who can add export XLS.