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.
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. https://www.ombulabs.com/blog/rails/upgrades/upgrade-rails-from-4-2-to-5-0.html
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: http://rails-hosting.com/
log_analyzer was updated with PDF/CSV support
https://github.com/igorkasyanchuk/log_analyzer/ 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.
Why proxying Bugsnag (or similar service) might be a good idea?
In this article I explain why it’s a good idea to proxy JS errors reporting through the back-end when using Bugsnag and how I implemented it in Ruby.
Ruby Case Statement Behind The Scene
A case statement consists of an optional condition followed by zero or more when conditions. It returns the value of the first ‘truthy’ when statement. Otherwise nil.. See more
Let's Encrypt Ruby on Rails and Nginx
How we run Ruby on Rails websites on SSL: install Let’s Encrypt certificate on a Ruby on Rails application running on Linux and Nginx. Use Certbot to manage the certificates and renew them automatically.
Protocol OAuth2: let’s play with Doorkeeper & Omniauth/OAuth2. Part 1.
Know your sandbox: shallow dive into OAuth2 protocol with Rails and Doorkeeper. [more inside]
Bare Bones Rails Action Cable Tutorial
A simple tutorial on how to implement an Action Cable chat server. [more inside]
Ruby Conferences & Camps in March 2018 - What's Upcoming?
Hello, at the calendar page @ Planet Ruby I collect all ruby conferences and camps from around the world. What’s upcoming in March 2018? [more inside]
How to parse command line options with Ruby OptionParser
Learn how to parse command line options in your Ruby scripts with the OptionParser class: https://readysteadycode.com/howto-parse-command-line-options-with-ruby-optparse