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.
Executing Python code with Ruby
Useful for accessing Python standard libraries, and re-using code already written in Python without having to port it to Ruby:
Microservices for Startups: An Interview with Julien Lemoine of Algolia
In this interview with Julien Lemoine of Algolia, he discusses how his team uses microservices to provide product teams with the resources & tools they need to create fast, relevant search using a powerful hosted search engine API.
Ruby 2.5 enables Thread.report_on_exception by default
Threads are hard to work because when they die then , by default, we don’t get much info. This new feature in ruby 2.5 would provide us more info when threads die due to an uncaught exception. Originally this feature was discussed 6 years ago. Read on to see why it took so long. [more inside]
Handling CORS issues in your Rails API
Anyone who has ever attempted to write an API will at some point come across a CORS error when an attempting to make a CRUD request to a server. Read More
First Steps with Sinatra as a Rails Developer - Part 1
The first part of a quick guide how to build a full-stack app in Sinatra from Rails developer’s perspective: READ MORE
Isle of Ruby 2018 - Measuring Chronic Pain Outcomes with Ruby and Twilio
Several of the Isle of Ruby talks were sneakily recorded unofficially by yours truly - the first here is my talk (intro starts at 1:50)
Embedded 0.4, a plugin for Rails/ActiveRecord
With embedded you can create Value Objects (simple POROs) with multiple attributes from your ActiveRecord models using a simple syntactic sugar.
Ruby instance_eval
Adding methods to an instance “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, etc..). [more inside]
Better sessions with JWT
Have you ever had issues building an authentication microservice or an API for your SPA using JWT? If so then today is your lucky day! [more inside]
Export your Rails performance metrics with scout_dogstatsd
Want your Rails performance KPIs (response time, throughput, error rate, time-in-queue, etc) in your DogStatsD-compatible metric system with almost zero effort? Try the scout_dogstatsd gem. scout_dogstatsd automatically instruments your web + background jobs, sending metrics to systems that support the DogStatsD protocol (like DataDog).
Microservices for Startups: An Interview with Chris McFadden of SparkPost
SparkPost’s VP of Engineering discusses how microservices have helped improve workflow and deployment at this leading email infrastructure provider.
The Ruby on Rails Maintenance Policy has been updated !
The security patches are no longer applied to the Rails 5.0.Z series.. see more
Explicit contracts for Rails - HTTP API RSpec usecase
in this article we will look at how to write tests when our application needs to make calls to 3rd party API using Test Contracts. Unlike Mocks, Test Contracts offers “fixture” like consistency across app while being easier to maintain than VCR gem “cassettes” [more inside]
tty-config - Ruby apps configuration data management
I’ve written tty-config to help with managing configuration options in Ruby apps, especially CLIs. I needed a simple api that will easily define, get and merge keys of arbitrary depth. It supports reading and writing of configuration options in YAML, JSON & TOML formats. No magic DSLs and converting keys into method calls. Pure and simple data lookups.
Ruby Multithreading: Queues, Consumers & Producers
In this video you will learn how to use the built-in queue class to implement a thread-safe consumer & producer model.
Deploy your Rails app faster with Mina, Phusion Passenger, Ngnix and MySQL on Ubuntu
Deploy your Rails application seamlessly using Mina - a faster deployment tool, Passenger, and Nginx. [more inside]
Polish Rails migrations like a boss
Wrote an article about Rails migrations work process:
Microservices for Startups: An Interview with Steven Czerwinski of Scalyr
Steven Czerwinski of Scalyr discusses how his experiences at Google colored his approach to microservices at Scalyr and how his team has successfully used microservices for their scalable log monitoring and analysis SaaS product.
WordpRSS - a simple gem to help with the RSS aggregation app creation
Have you ever thought about building an RSS aggregator app with Rails? If yes then I have some goods news for you. I created WordpRSS – a simple Ruby gem that will help you to pull the data from any WordPress RSS channel. READ MORE
Ruby Bitwise Operators
An operator is bitwise when instead of treating integers as whole numbers, it treats them as a sequence of bits. [more inside]
Turbolinks, Stimulus, and React living in harmony
I recently started porting our React SPA back to Rails where it made sense and found a nice way to use Turbolinks, Stimulus, and React together along the way. [more inside]
Full text searching Linux man pages with Elasticsearch
A post about playing around with the elasticsearch gem to index Linux man pages for full text searching. Ruby script on GitHub.
class_eval vs module_eval
Adding methods or attributes to a class/module “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, rake, rack, etc..). [more inside]
Ruby 2.5 supports measuring branch and method coverages
Ruby 2.5 has added many features to know precisely what line of code has been executed and how many times. This blog discusses all that and much more. [more inside]