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.
108 Megapixel camera phones - your ImageMagic will crush
We are living in a age of ridiculous smartphone cameras. Chances are you will see user uploading 108 Megapixel images and your ImageMagic crushing when ActiveStorage variants process them. In this article I’ll show you a solution [more inside]
A Rubyist's Apple M1 Review
A broad look into the Apple M1 from the perspective of a Ruby Developer. We look at a lot of the different aspects; Docker, asdf Ruby, Visual Studio Code, and more. https://www.driftingruby.com/episodes/a-rubyist-s-apple-m1-review
Hix on Rails - Well maintained Ruby on Rails project generator
Hix on Rails injects the setup wizard into the usual Ruby on Rails new project creation flow. [more inside]
If Ruby Had Imports…
Sometimes it’s bonkers how much you have to import in other languages in every file before you get to the actual code. Thankfully Ruby provides a better way. Read this article for a funny thought experiment and an overview of Zeitwerk and Ruby autoloading.
Apple M1 Findings
In preparations for a Drifting Ruby screencast on the Apple M1 findings from a Rubyist perspective, I’ve created a thread with all of the findings. https://twitter.com/DriftingRuby/status/1331435018325987329?s=20
Ruby Advent Calendar 2020 - 25 Days of Ruby Gems / Libraries - Claim A Day!
Hello, a little reminder. Starting up in 5 days! I’m trying a new edition of the Ruby Advent Calendar this year in 2020 - 25 Days of Ruby Gems / Libraries from December 1st to December 25th. Have your say, yes you can! Claim a free day (and post about your favorite ruby gem). Cheers. Prost.
Pitfalls of Rails db transactions
this article you can have a look on common Pitfalls of Rails db transactions [more inside]
Rails ActiveStorage is automatically storing width/height of image
When reading ActiveStorage Overview Guild chances are you missed section on #analyze which claims: [more inside]
Continuous Deployment to Heroku with Rails & GitHub Actions
GitHub Actions works great for running Continuous Integration and Continuous Deployment (CI/CD). Watch the Continuous Deployment with Rails & GitHub Actions screencast.
season-formats gem - read / parse and print seasons (e.g. 2020/21)
Hello, I have put together (extracted really) a little helper class
for seasons and bundled up in the season-formats gem / library
for easy (re)use that lets you read / parse and print seasons (using an academic e.g. 2020/21 or calendar year e.g. 2020). Cheers. Prost. PS: Bonus, yes you can use the new Season class with ruby’s built-in ranges too e.g. Season( '2010/11' )..Season( '2020/21' )
Manage ranges and overlaps with ease by using multi_range
multi_range allows you to manipulate a group of ranges. Such as merging overlapping ranges, doing ranges union, intersection, difference, and so on.
A short deep dive on Symbol#to_proc
In this article we explore what happens with the “ampersand, symbol” syntax and how the result differs from “regular” blocks [more inside]
Ruby Advent Calendar 2020 - 25 Days of Ruby Gems / Libraries - Have Your Say!
Hello, I’m trying a new edition of the Ruby Advent Calendar this year in 2020 - 25 Days of Ruby Gems / Libraries from December 1st to December 25th. Starting in 10 Days. Have your say! Claim A Free Day. Cheers. Prost.
Unofficial guide to Tailwind and ActionText for Rails 6
I recently wrote an article on how to install ActionText using the latest Rails 6, also it guides you through the workarounds of using it with Tailwind. [more inside]
Where Do Ruby Blocks Come From?
It’s time to get reflective…time for some deep introspection…so light a candle or two, put some Barry White on the stereo, get nice and comfortable, because we’re going to talk about Blocks. Blocks in Ruby are powerful, and they’re used everywhere. But we’re not here to talk about how to write blocks per se or what they’re good for. We’re here to talk about where they come from.
Fun with Ruby method argument defaults
A quick overview of simple but powerful (if weird) techniques of (ab)using Ruby method argument defaults, like def read_data(file: raise(ArgumentError, '#read_data requires path to .txt'))
Adding Authentication in Rails 6 with Rodauth
Tutorial on adding authentication to a Rails 6 app using the Rodauth authentication framework: https://janko.io/adding-authentication-in-rails-with-rodauth/