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 comprehensive changelog
Although the news are 1.5 years old, I believe it still could be interesting/useful: Ruby 2.5 changelog with references to docs, discussions, explanation of change reasons and code examples.
Ruby and GraphQL: what to use for your next project?
A lovely duet of two GraphQL gems with their week and strong sides: https://medium.com/@po.jurcys/rubys-graphql-beauty-and-the-beast-story-17c72592ab11
A simple guide to add 2FA to your user's authentication API in ruby on rails
We’ll learn by doing, to add 2FA security feature to your user’s authentication API in ruby on rails. Here’s the Article
GraphQL on Rails
This guide is about building a Rails/GraphQL/React/Apollo application from scratch. A first part of the series is dedicated to queries - a GraphQL way to fetch the data.
I Updated Rails. Now Everything's on Fire.
Once a Rails app has bundled at the next version of Rails, it is common to have a number of errors to handle before your test suite will run. In this post, I walk-through one of the common issues we see. Read here
Testing A Locally Running App Inside VirtualBox
Yesterday I had to fix one of occurs-only-in-one-browser issues – so I ran VirtualBox, typed the address to my app into some legacy IE – localhost:9292 – and… it didn’t work. In this short blogpost is how I got it all to work together: https://blog.rebased.pl/2019/06/03/testing-local-app-in-virtualbox.html
Meet trip, a concurrent tracer built on set_trace_func & implemented in pure Ruby.
trip.rb is a concurrent tracer that can pause, resume and alter code while it is being traced. The tracer yields control between two threads, typically the main thread and a thread that Trip creates. Under the hood, Trip uses Thread#set_trace_func. It could be used to implement a debugger.
[Screencast] Inline Editing Records
Using Rails UJS, we create an interactive row editing solution without using any kind of Javascript frameworks. https://www.driftingruby.com/episodes/inline-editing-records
Preventing minitest-focus during CI test runs
Minitest-focus is a great gem during development to only execute certain tests. However, it’s easy to miss and accidentally leave in while doing a CI test run, which could give false positives. Read here for ways to prevent during CI.
XDG 3.0.0 - New Gem Ownership
XDG is a great way to organize your program’s configuration, cache, and data. After ~7 years of inactivity the XDG gem is now under new stewardship. 🎉 With the 3.0.0 version, there is a new implementation and API that adheres to the XDG specification. If you need additional functionally beyond what the XDG specification provides then check out the companion Runcom gem. Enjoy!
Gem which helps initialize class instance with .call method.
.call(*args) => #new.call(*args) [more inside]
Graphs in Ruby
This gem allows to create simple directed and undirected graphs. Basic operations allows easily implement graph algorithms.
Object Equality in Ruby
In Ruby, as any classes inherit directly (or not) from the Object class, then the object equality logic is implemented between the Kernel module and the BasicObject class. [more inside]
Ruby on Rails - Bounded contexts via interface objects
In this Article I’ll show you how to organize business classes in Ruby on Rails so your application can benefit from Bounded Contexts while still keep Rails conventions and best practices. Solution is also friendly for junior developers. [more inside]
[Interview] Rails Upgrades with Eileen Uchitelle
The Maintainable Software Podcast interviewed Eileen Uchitelle from Github about Rails upgrades last week. Here’s the transcription from the first half of that interview. [more inside]
Understanding Ruby: String Encoding, ASCII & Unicode
Do you know the difference between ASCII & Unicode? https://www.rubyguides.com/2019/05/ruby-ascii-unicode/
Vandal - ActiveRecord force destroy records with all related associations.
A small gem that helps to delete an ActiveRecord instance or collection with associations (skipping callbacks or validations). It may be useful to remove broken data on test servers or locally. [more inside]
Choosing Ruby On Rails For Your Next Web Development
Choosing Ruby On Rails For Your Next Web Development Project is the 70 pages-long single resource on Ruby on Rails covering all the main topics related to the framework. Written from a business perspective, aimed to help product owners, startup founders, and C-level executives make better decisions when it comes to web development. You can read it here: Ruby On Rails Development Guide
Accessing Google Sheets with Ruby
If you have some data in Google Sheets (perhaps you have a team collaborating there) and you’d like to use that data in your Ruby applications, this short video tutorial will show you how.