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.
Top 10 errors from 1000+ Ruby on Rails projects (and how to avoid them)
We’ve compiled a list of the top 10 errors from more than 1000 Ruby on Rails projects in production. We’re going to show you what causes them and how to prevent them from happening. If you avoid these “gotchas,” it’ll make you a better developer. [more inside]
Ruby's NameError has approximate knowledge of many things.
NameError is raised when you reference a constant or a variable which isn’t defined in the current context. See code examples and learn how Ruby 2.3+ helps you debug NameError.
The best code editors for remote pair programming
This article looks at the strengths and areas for improvement of some of the best code editors out there for collaborative work
Who’s responsible for the software we build?
Turns out running a company isn’t just about money, fame or even cool products and happy customers. We have a social responsibility towards our employees and society at large: https://blog.phusion.nl/2018/04/19/whos-responsible-for-the-software-we-build/
How To Create A Memory Leak in Ruby
There are a few articles out there about how to find memory leaks. But do you know what a memory leak looks like? http://www.rubyguides.com/2018/04/ruby-memory-leak/
Running a Government Department on Ruby for over 12 Years - Jeremy Evans
Great talk from Jeremy Evans at Isle of Ruby this last week: https://www.youtube.com/watch?v=2Rm7wLNmsco
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: https://readysteadycode.com/howto-execute-python-code-with-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) https://www.youtube.com/watch?v=Qf0S29bJbPg
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. https://www.youtube.com/watch?v=x7NYf9xughk
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: https://railsguides.net/polish-rails-migrations/
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.