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.
Rails's .try vs Ruby's &. (a.k.a safe navigation)
Rails’s .try vs Ruby’s safe navigation [more inside]
A Beginner's Guide to Ractors in Ruby
Ractor is Ruby’s new Actor-like concurrency abstraction—it lets execute code in parallel without worrying about thread safety. This article is an excellent introduction to Ractors and how to begin using them in your Ruby code. https://www.honeybadger.io/blog/ractors/
Best way to work with Front Matter in Ruby!
If you want to work with frontmatter in Ruby, you need to know the front_matter_parser gem. Here is everything you need.
Tracking down not resolving constants with parser
Recently we started upgrading Ruby 2.4 app. One huge change Ruby 2.5 introduces is removal of top–level constant resolution. This can cause serious runtime issues, remaining unspotted before hitting the production, especially if app lacks appropriate test coverage. [more inside]
Adventures in Time: Debugging a Daylight Saving Bug
I wrote up a little adventure I had last fall debugging a spooky daylight saving bug ⏰🐛 [more inside]
Failing In Public | Rubber Duck Dev Show 76
In this episode, we discuss failing in public and how senior developers live-streaming their learning process could be beneficial to other devs: https://www.rubberduckdevshow.com/episodes/76-failing-in-public/
An introduction to ORMs
Object-relational mapping (ORM) is a technique used to connect and represent relational databases with object-oriented programming languages. Active Record is one of the most popular ORM frameworks available for web application development. Like any technology, Active Record has its pros and cons, which we will explore in this essay. [more inside]
[Screencast] Deploying with MRSK
MRSK deploys web apps anywhere from bare metal to cloud VMs using Docker with zero downtime. In this episode, we will set up a Digital Ocean infrastructure with a Load Balancer, Virtual Machines, and a PostgreSQL database. We’ll use MRSK to provision and deploy our Rails application to the Virtual Machines. https://www.driftingruby.com/episodes/deploying-with-mrsk
TableInspector: A Gem to print table schema in database
I wrote a gem to print table schema in console. It will be helpful when you want to check the table schema in rails console. Gem repo: https://github.com/otorain/table_inspector
Use Bundler in a Ruby script
Did you know that we can use Bundler without a Gemfile? https://dev.to/notgrm/use-bundler-in-a-ruby-script-2dpn
LightBlog: a file-based blog app written with Roda
I’ve open-sourced the bulk of my blog in the light_blog gem. My blog is hosted for free in GCP using the e2-micro engine. Check it out.
AnyCable v1.3: embedded NATS, StatsD, and more
AnyCable v1.3 has been just released. The major highlights are embedded NATS support (no need to deploy a standalone pub/sub engine), smart configuration defaults for Fly.io , and out-of-the-box integration with Rails 7 error reporting interface. [more inside]
A Call For Help - Please, Stop the Attack(s)
Hello, for the record I am banned on r/ruby and r/rails and ruby-talk for what? Now I am under (ongoing) attack on github (and reddit) and on (for two weeks going). Does anyone care? (A rethoric question, isn’t it?) For the record - Please, rethink the perma-ban policy and actually ban perma-bans. For honest people like myself (if I dare to say) who use one “doxxed” account (and no sock puppets) the system is seriously broken and in favour of misuse. Cheers.
Adding dark mode to your Rails application with Tailwind and Stimulus
This post walks through the steps to add a dark-mode toggle to your Rails app with Tailwind and Stimulus JS. On top of actually implementing the ability to toggle back and forth, I’ll also go over some ways you can create your own custom dark theme [more inside]
Stop using eager loading in your Rails application; use this instead.
Are you tired of fixing N+1 issues? Maintaining proper eager-loading manually makes you unhappy? I have good news for you! There are one-line solutions that make N+1 go away. Doubts? Check my new post for the details. https://medium.com/@evgeniydemin/stop-using-eager-loading-in-your-rails-application-use-this-instead-b837f0246033
rubocop-graphql 1.0 released
A collection of 25 cops for Rubocop to take your GraphQL code to the next level. Link: https://github.com/DmitryTsepelev/rubocop-graphql
Ruby IDE Showdown With Adrian Marin, CJ Avilla & Eric Berry | Rubber Duck Dev Show 75
In this episode, we have a Ruby IDE showdown with Adrian Marin, CJ Avilla & Eric Berry: https://www.rubberduckdevshow.com/episodes/75-ruby-ide-showdown-with-adrian-marin-cj-avilla-eric-berry/
Rails 7. Start Kit. Production Mode and Configurations
Hello! New release of Rails 7. Start Kit. I this Release v1.8 I provide running the app in Production mode and also spent time to explain what an approach I use to configure my application. I hope the project and the release note will be helpful for you! Happy Coding!
Bulding apps data-first with Sinatra
The Ruby ecosystem is rich with tools that make us developers more productive at what we do. Both Rails and Sinatra have been used to build web application proof-of-concepts and prototypes. But which one is better? [more inside]