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.
Improving Ruby Performance with Rust
Rust is a (compiled) systems language focused on speed and safety. What about integrating it with Ruby? Here’s an introduction. [more inside]
Kafka on Rails: Using Kafka with Ruby on Rails - Part 1 - Kafka basics and its advant
In this series of articles, I will try to provide you with an explanation on why you should invest your time in learning Kafka and the Karafka framework and how it can reshape the way you design and develop your Ruby applications. https://medium.com/@maciejmensfeld/kafka-on-rails-using-kafka-with-ruby-on-rails-part-1-kafka-basics-and-its-advantages-88e80e221ac3
A new extension for application-level mutexes with Sequel ORM and PG is available!
A new extension sequel-pg_advisory_lock for Sequel ORM has been implemented! [more inside]
Partial rendering performance in Rails
Some numbers about rendering times with different techniques. I see often that people are not aware of the importance of rendering views, and especially partials, in the proper way in Rails. In this blog post I show the different approaches with relative numbers. [more inside]
Safely migrating has_and_belongs_to_many associations to Rails 4
Learn about how you can discover changes in Rails defaults by using association reflections and make migrations easier.
Refactor your app away from controller specs
I’m revisiting my series on future-proofing Rails test suites by removing controller specs. This time, I turn my attention to the controllers themselves, and look at ways to make your app’s logic more testable through refactoring. Enjoy!
Chain of Responsibility Pattern
The intent of Chain of Responsibility pattern is to decouple the sender of a request from its receiver by giving more than one object a chance to handle the request. http://rubyblog.pro/2017/11/chain-of-responsibility-ruby
Spend less on Google Translation API
How to significantly reduce your spending when you use Google Translation API to automatically translate long repetitive texts. This solution uses NLP techniques along with caching and have been turned into a gem for everyone to use.
AdequateErrors - Overcoming limitation of Rails model errors API
AdequateErrors gem aims to overcome limitations of ActiveModel#errors object by offering more fine-grained controls.
Handling HTTP OPTIONS in Rails in a clean way..
..which is perfect for API introspection (like providing request/response schemas etc). You can find more info here. Too bad that Rails doesn’t provide a cleaner way.
Observers in Padrino
An article how to use observers in Padrino under https://wikimatze.de/observers-in-padrino/
Instrumenting Ruby Methods
Instrumentation is the addition of measurement to code - for example timing how long Ruby is spending in a given method. Here I propose an unintrusive Ruby 2.0+ technique to add instrumentation to arbitrary methods.
Wrapping GitHub API endpoint with DuckRails & Embedded Ruby
DuckRails updated wiki pages now include a guide for wrapping existing endpoints with an example wrap of a GitHub endpoint with embedded ruby.
BitSettings transform a column of your model in a set of boolean settings.
BitSettings is a plugin for ActiveRecord that transform a column of your model in a set of boolean settings. https://github.com/pioz/bit_settings
Microservices for Startups
Microservices for Startups is a 12-chapter guide for engineering leaders and teams. It’s chalked full of practical advice and real examples for teams considering microservices. It’s designed as a reference book you can use as you navigate adopting Microservices in your company. [more inside]
Karafka (Ruby/Rails + Kafka) framework 1.1.0 Release Notes
Recently there has been a bigger release of Karafka, a Ruby + Kafka framework for Apache Kafka based Ruby and Rails applications development. This article covers major changes introduced with this release and provides some example use-cases on their usage. https://medium.com/@maciejmensfeld/karafka-ruby-kafka-framework-1-1-0-release-notes-b4c91170ecba
5 Ruby on Rails Tips You Probably Don’t Know
Sharing some rarely used Ruby on Rails tips in this article: https://medium.com/@igor.petrov/5-ruby-on-rails-tips-you-probably-dont-know-8b80b4a0890f
Atom Tricks, Plugins & Shortcuts for Ruby Developers
Improve your productivity as a Ruby developer by using the best Atom packages, shortcuts & tips! http://www.rubyguides.com/2017/11/atom-tricks-for-ruby-developers/