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.
Encrypted Credentials — A new way to use Secrets in Rails 5.2
Rails 5.2 has a new way to use secrets.yml. It’s secure and much simpler than we are using in version 5.1. Now, you can even track GitHub history of your secrets. For details you can check my blog here: [more inside]
Would you like to see ActiveStorage work with models that use UUIDs as primary keys?
ActiveStorage will not work with UUIDs out of the box. Chime in on the PR to change that here: https://github.com/rails/rails/pull/32466
Handling Errors Gracefully
I created a way to implement some kind of “Result Object” by rescuing StandardError instances and handling these errors gracefully. See my implementation here.
TIL - Ruby Array Multiplication
Today I learned that if you call a multiplication operator on a Ruby array, it duplicates each element of the array by the multiplier. Not sure what the use case would be. For fun, I created an exponent operator for array as well, using this functionality. [more inside]
Free eBook: Rails Testing Handbook
Tired of fragile code? This hands-on book will teach you how to build better Rails apps with confidence. What we share inside has helped us get Semaphore to web scale without losing minds. Download today.
How to Contribute to Ruby
Do you want to become a Ruby committer? Are you interested in learning from language designers? Do you want to get in the loop on conversations in the Ruby open-sourced development community? If so, this post is for you. More.
Rspec, system tests, JavaScript and Select2 recipes
System tests are great and they can actually be fast now. They just currently have a few gotchas. This article aims at introducing system tests onto your app and test a jQuery select2 tag implementation. Read more on blog
How To Make An App Like Periscope
How To Make An App Like Periscope [more inside]
SOLID Principles #4 - Interface Segregation Principle
Five-part series of blog posts about SOLID Principles. This one is about the fourth of them - Interface Segregation Principle: [more inside]
Fixing Kernel#singleton_method bug in Ruby.
It’s a story about how I fixed a bug in Ruby’s Kernel#singleton_method. [more inside]
ImageProcessing 1.0 Released: Wrapper for ImageMagick and Libvips
ImageProcessing is a gem that provides higher-level image processing helpers that are commonly needed when handling image uploads. Initially the gem came with a simple module-based API and provided only processing with ImageMagick (via MiniMagick), but recently it was rewritten with a more flexible chainable API, and also gained libvips support which can be up to 10x faster than ImageMagick. Read more about it here.
Understanding a Ruby Wat
http://pauloancheta.com/ruby/wat/2018/03/23/explaining-wats/ A few weeks ago, a co-worker found something really interesting. He posted on our slack channel this line of code. Does anyone know what the output of this is? “(data)”.gsub(“(data)”, “15\01\2018”) [more inside]
Client Side File Uploads with Amazon S3 for a production project
One of our most recent clients needed a site to promote their 25 years anniversary event. At first, they thought to develop it on top of their Ruby powered CMS. However, after a careful analysis, we found out that they didn’t really need any of the features provided by their CMS. As a promotional site, a static website was enough to fulfil their needs. [more inside]
RubyMine 2018.1 released: Faster IDE, Run anything action, and other improvements
The new RubyMine 2018.1 features Postfix code completion, Run and Debug anything actions, significant performance updates, and many other improvements. Learn more and download the new version from the What’s new page: https://www.jetbrains.com/ruby/whatsnew/
Passenger 5.2.3 released
Version 5.2.3 of the Passenger application server released, fixing a macOS build issue and improving Python 3 support, ao: https://blog.phusion.nl/2018/04/04/passenger-5-2-3/
Multi Environment Credentials for Rails 5.2.0
Encrypted Credentials are coming in Rails 5.2.0, however they’re missing a way to handle non production credentials in a unified API. That’s why the gem creds was built. Check out a brief introduction on https://freeletics.engineering/2018/04/04/creds-multi-environment-credentials.html
Phoenix Chat for your Rails application
How to create Phoenix chat application that can be easily added to your existing Rails project and have some other nice features https://medium.com/@korolvs/elixir-beside-rails-2b94414bcb03
How Scott's Cheap Flights is Scaling with Rails
Scott’s Cheap Flights is a curator of international flight deals that travelers can subscribe to. They recently migrated from WordPress to a custom Rails app. Hear from their Lead Developer about the transition. P.S. They’re hiring for Rails devs! [more inside]
Do you really need WebSockets?
Over the years I’ve had this conversation a couple of times. This post will explain why we use WebSockets, how they can be used, what alternatives exist and when to use them. Read more…
Design Patterns in Large Rails Applications: Query Objects
Design patterns in large Ruby on Rails web applications: constructing a Query Object class that is responsible for elegantly querying a database READ MORE
How Getting Featured by Hacker News Affected my Passive Income
Two weeks ago my blog post made it to the top of Hacker News. Around 30k people read about my side project Slack bot that day. In this blog post, I will describe how it affected the project and my other passive monetization and marketing strategies. [more inside]