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.
Timber Gem - My solution to Ruby's hard to use logs
Hi everyone! You might remember from me from my Authlogic days, I’m really excited to share Timber with you. A thorn in my side has always been Ruby logging. Logs are essential for insight, but oh how I hate hated using them. Timber is my solution. Highlights: logrageify option, integrates with rails/sinatra/hanami, support for context & structured data, tail users. I’d love feedback on it.
Autocorrect with Postgres Trigrams
Did you know Postgres can provide spelling suggestions? Here’s how to use pg_trgm to auto-correct search queries in a Rails app.
Introduction to Concurrency Models: Processes, Threads, GIL, EventMachine, Fibers
In the blog post, I describe the differences between Processes, Threads, what the GIL is, EventMachine and Fibers in Ruby. When to use which of the models, which open-source projects use them, what the pros and cons are.
A Quick Analysis of How Sinatra Works
What can we learn from reading Sinatra’s source code? What interesting tips & tricks can we discover?
Gem Check – writing better Ruby gems checklist
This is the checklist for authors and maintainers of Ruby gems to help them build better open-source software. Read more
Rails 5 & Vue.js: how to stop worrying and love the frontend
Vue.js doesn’t only meet the awesome React, but also exceeds it in speed and performance. And finally, there has been added a modern frontend support in Ruby on Rails 5.1. It’s so nice and convenient, that our mkdev mentor Ivan Shamatov got over his fear of the fullstack development and even took a fancy to it. In this article he’ll tell you about how to integrate Vue.js into a Rails app. Read more
How to make AJAX calls in Rails 5.1
Learn how to make AJAX calls in Rails 5.1 using rails-ujs, jQuery or axios. Rails 5.1 shipped without jQuery as a dependency, replacing it with its own library rails-ujs for Unobtrusive JavaScript features. There are a few changes in the way you do AJAX calls, including things like data formats and CSRF tokens. This short article will bring you up to speed.
The === (case equality) operator in Ruby explained in examples
Check out how standard classes implement the === operator and how you can use it in your class as well.
webservice gem - yet another HTTP JSON API (web service) builder (in 100 lines)
Hello, I’ve put together a webservice gem - yet another Sinatra-style HTTP JSON API builder (in about 100 lines of ruby). Why? Why not ;-) The main “innovation” is easy dynamic loading of services e.g. use Webservice.load_file() to get a ready-to-use web services (rack) app. Cheers. PS: Inspired by Almost Sinatra (Sinatra in 6 lines of ruby) and New York, New York, Nancy, Rum, Cuba, and other Sinatra-like micro libraries.
Eager Loading Polymorphic Associations with Ruby on Rails
A tutorial on eager loading polymorphic associations with Ruby on Rails avoiding “n-plus-one” queries.
Goby v0.1.0 is out
Remember there was a language called Rooby, which said it want to help developing microservices more efficiently? In the past few months it quickly evolved and it’s now called Goby! Read more
Trailblazer + GraphQL Starter kit
sinatra-grapqhl is an opinionated starter kit to use sinatra with trailblazer, react and grapqhl
Small functions considered awesome
There’s been some controversy lately, so I wanted to throw my two cents in. Small functions are awesome!
How do you do a Rails deep dive?
Did your code break in such a weird way that you wonder if you really understand it at all? It might be time for a deep dive. But knowing you need to dive deeply into a topic? That’s only step 1. How do you actually learn a Rails topic down to its fundamentals?
Spree 3.3 with Rails 5.1 support released!
Spree is a complete modular, API-driven open source e-commerce solution built with Ruby on Rails. We’re super happy to announce Spree 3.3 release with Rails 5.1 & Ruby 2.4 support, Segment integration, enhanced data integrity and many more features contributed by the Spree Community Major new features: Read more
Do you know? Adding SSL will make your site more visible
Nowadays security is a major concern. Do you know adding SSL will make your site more visible in search results? Add SSL in very easy step by following:
Introdutions to : Threads, Queue and SizedQueue
To make our applications do multiple things faster at the same time, we can use Ruby threads. For a long-running application, re-using a pool of such threads can provide great performance benefits. Thread pool is a way to have a fixed set of threads doing the work, instead of creating new ones each time. Read more
Exporting rails models to CSV and XLSX
Xport is a new gem that helps create XLSX/CSV files from rails models.
Finding Fibonacci In Golden Trees
When we learn about super theoretical stuff (like a lot of core computer science concepts) it’s hard to connect the dots between where these concepts were created, why we use them, and why we should care. In this post, however, mathematics, computer science, and nature all come together in the most magical of ways.
Factories or fixtures? Why not both?
An article on how to use a mix of factories and fixtures in Ruby to test for large data structures. Read more
'String Sanitizer' gem
This is a gem about Sanitizing any string. This gem is in beta version so it doesn’t have much features, but it has 1. Escaping Quotes, 2. Encoding and Decoding HTML Entities. Any contribution is warmly welcome. The gem’s repo - Str_Sanitizer
Auther 8.0.0
The Auther gem/engine is a great tool for situations where you need to temporarily lock down an app before a major authentication system is added. With this release, it simplifies the stylesheets by using CSS Flexbox layout and removes unnecessary gem dependencies for a more light weight experience. Enjoy!
Active Record’s queries tricks
My favourite part of Rails is ActiveRecord’s scopes. Their expressiveness and their reusability is great. See here a few tricks I usually bring during consulting missions.
Writing Slack Commands APIs in Ruby
In this series of posts, I’m going to share with you how to setup a new Slack Command API using Ruby and Heroku as backend service. Read more