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.
One Year CryptoKitties! Copycats Unchained Command Line Tool (& Core Library) Updated
To celebrate One Year CryptoKitties! I’ve updated the copycats command line tool (and core library) - CryptoKitties collectibles unchained - with the latest traits / cattributes and more. Free and open source (and all in ruby). Happy bits & bytes collecting w/ ruby.
[Talk] RubyConf - Reducing Enumerable
Video for the talk is live: https://youtu.be/x3b9KlzjJNM
Using the Serverless framework with Ruby on Lambda
The new AWS Lambda support for Ruby is simply awesome. Check out my quick example of running Ruby code on Lambda via the Serverless framework, complete with info on how to get gems with compiled extensions to work.
Enhance your "belongs_to" to be two times faster
database_validations gem introduces a new db_belongs_to helper. It ensures consistency and provides better performance. Check out this article to get more details.
Ruby Quiz - Challenge #7 - Type Inference - Convert Strings to Number, Not a Number
Ruby Quiz - Challenge #7 - Type Inference - Convert Strings to Null, Number, Not a Number (NaN), Date & More. Happy data wrangling and type inferencing with Ruby.
Using Scenic and SQL views to aggregate data (Ruby on Rails)
Using Scenic and SQL views to aggregate data (Ruby on Rails) [more inside]
Passenger 6 supports every and all languages
Tell your friends in the Go, Rust, Swift, Java, Elixir, … < insert language > communities! They can use Passenger (Enterprise and open source) since today! Happy holidays: https://blog.phusion.nl/2018/11/30/passenger-6-0-generic-language-support/
SOLID Rails: A Phantom Pain
The article aims to analyze why don’t Rails developers always follow object-oriented design principles.
Scaling Sidekiq in Production
In this post, I talk about how to optimally scale Sidekiq to process jobs on millions of records in a memory constrained environment like Heroku. https://medium.com/@rajagopals/scaling-sidekiq-in-production-ca4d3d0002db
Ruby Support for AWS Lambda
AWS announced support for Ruby on AWS Lambda. [more inside]
Mastering data structures in Ruby — Graphs.
On this post I’ll show you how to implement graphs from scratch Ruby. Check it out I hope you find it useful!
Ruby Quiz - Challenge #6 - Build the Table of Contents (ToC) for Documents
Ruby Quiz - Challenge #6 - Build the Table of Contents (ToC) for Documents in Markdown. Happy data wrangling and text processing with ruby.
Using IMGIX to Personalize Knolled Images
Even here at Custom Ink, we use knolling to showcase our products. But how could we personalize knolled images to help our customers visualize their creations? We often use IMGIX to help us process & optimize catalog images and decided to give its blending capabilities a try out. Let’s jump right in and explore how.
Deploying a Rails 5.2 PostgreSQL app on AWS Elastic Beanstalk
After using Heroku for years, I wanted to give AWS Elastic Beanstalk a try. My experience during deployment was less-than-stellar, so I wrote a tutorial on deploying a Rails 5.2 / PostgreSQL app on AWS Elastic Beanstalk to help others who might be in the same situation I was.
Finding Ruby Performance Hotspots via Allocation Stats
I wrote up a walk-through of how I discovered and fixed some performance issues in the RubyParser gem by investigating object allocations.
Sandboxed Rake Tasks for Your Rails app!
Write sandboxed Rake tasks that rolls back any changes you made in the database! [more inside]
Your language's built-in server was never meant for production use (the Ruby version)
The de facto web server that ships with your language hasn’t been hardened against attacks, and using it outside of development is irresponsible: https://blog.phusion.nl/2018/11/28/why-you-need-a-ruby-app-server/
Stopping slow client DoS attacks with Puma on Passenger 6
There’s something to say for combining Puma and Passenger, the 2 most popular app servers for Ruby applications, in fighting off slow client DoS attacks: https://blog.phusion.nl/2018/11/28/stopping-slow-client-dos-attacks-with-puma-on-passenger-6/
Stub active record relations in tests
If you fight with your slow specs this article can be helpful: https://railsguides.net/stub-active-record-associations/
Better Ruby Gem caching on CircleCI
I’m saving a whopping 2 minutes for every build on CircleCI by using more robust Gem caching. Read Better Ruby Gem caching on CircleCI and so can you.
Advanced Ruby exception handling
How many times have you, while investigating an (admittedly rare ;)) production bug, stumbled upon an exception backtrace that just doesn’t have enough information? For example, an exception gets reraised, destroying the original backtrace with it. So now your logs say that your AI failed to take over the world with AIEpicFailError (great, you already know that), but not why (Timeout::Error while connecting to stackoverflow.com). [more inside]
ApiStruct - API wrapper builder with response serialization
Build on top of dry-monads and http Provides ORM-like behavior of API responses https://github.com/rubygarage/api_struct