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.
Creating a REST API with Ruby on Rails. Cap 2
Here I show my way of creating REST APIs with Ruby on Rails. This might seem simple for those who already know, but it could be of great help to someone who is just starting out: https://a-chacon.com/en/rails/ruby/2024/06/23/creating-rails-api-cap-2.html
Glimmer DSL for LibUI 0.12.0 Custom Control Component Slots
Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library) version 0.12.0 ships with an exciting new feature called Custom Control Component Slots!!! Component Slots are containers that could accept content in different parts of a Custom Control component (e.g. an address_form Custom Control can have a header slot and a footer slot to display extra information about the address being entered, which consumers could fill in with any GUI controls). A new example has been implemented to demonstrate this feature: Class-Based Custom Control Slots. https://andymaleh.blogspot.com/2024/06/glimmer-dsl-for-libui-0120-custom.html
Video Tutorial: How Do I Drag and Drop Items in a List?
I added two video tutorials which really help show how interactive Rails/HOTWire/Stimulus can be with a simple JavaScript controller. Client side: https://youtu.be/riBrFASNaHs Server side: https://youtu.be/NuWWk6iWgwg Original post: https://onrails.blog/2024/03/08/hotwire-tutorial-how-do-i-drag-and-drop-items-in-a-list/
schwad_performance_logger v0.5 released
https://schwad.github.io/2024/06/21/schwad-performance-logger-0-5-released.html
Introducing OmniAI - The Interface to Every LLM
OmniAI is an LLM agnostic Ruby gem supporting OpenAI’s ChatGPT , Google’s Gemini, Anthropic’s Claude, Mistral’s LeChat, and more! For a quick introduction checkout the launch post.
🚀 Exciting News! The Ruby Warsaw Community Conference is just one month away, on Jul
📍 Location: Palace of Culture and Science, Warsaw, Poland - right in the heart of the city! [more inside]
Refactoring transaction blocks with the endless method
I pushed the limits of using the endless method by refactoring some AR transactions blocks into endless methods. I also discuss there the pros and cons and how the community sees this kind of code shape.
`true`, `false` and `nil` in Ruby 💎
You will learn how to easily optimise memory allocation making better use of these 3 objects and why they work this way. https://mathieu-eustachy.com/articles/in-depth-ruby-memory-optimisation-true-false-and-nil
Measuring Ruby Garbage Collector
The Garbage Collector releases memory slots from unused objects. However, it interrupts the Ruby execution and might significantly increase requests’ response time. Would you like to know how the GC slows down your app? https://www.rorvswild.com/blog/2024/measuring-ruby-garbage-collector
v0.7.4 release of actual_db_schema
Exciting news! We’re rolling out a special release of actual_db_schema! Version 0.7.4 adds support for Rails 6.0 and the edge versions.
Creating a REST API with Ruby on Rails
Here I show my way of creating REST APIs with Ruby on Rails. This might seem simple for those who already know, but it could be of great help to someone who is just starting out: [more inside]
Todo MVC Ruby Edition is the one Todo MVC To Rule Them All!!!
Todo MVC is a popular sample that is built in all Web Frontend Frameworks to provide a comprehensive example covering all basic Frontend features. As such, it provides Software Engineers with a very good idea of how day-to-day Frontend Development would be with every Frontend Framework, whether in JavaScript, using React, Angular, Ember, or Vue, or in a Compile-to-JavaScript language, using something like Elm, GWT, or Scala.js. I am happy to announce that Todo MVC has just been built using Glimmer DSL for Web with 100% Frontend Ruby code. And, this version’s code is easily simpler, more minimalistic, more readable, and more maintainable than all 45+ versions on the Todo MVC website! I can confidently say it is the one Todo MVC to rule them all! Thanks to the awesomeness of Ruby in the Browser!!! https://andymaleh.blogspot.com/2024/06/todo-mvc-in-ruby-is-one-todo-mvc-to.html
Curated dashboards in Honeybadger
Here’s what we worked on during our last product cycle at Honeybadger: a curated Rails performance dashboard with automatic Ruby instrumentation! ✨
Creating indexes on big tables like a boss
Struggling with adding an index to a large table in your Rails app without clogging deployment pipeline? [more inside]
Synvert now supports the Prism parser
Synvert provides the ability to write code snippets that can automatically rewrite your source code. Here’s a post to demonstrate that synvert supports the prism parser now. https://synvert.substack.com/p/synvert-now-supports-the-prism-parser
Understanding Kamal healthchecks
Here’s a post on all the healthcheck settings you might want to understand in Kamal.
ActiveStorage::Blob#compose Now Supports Custom Blob Key in Rails 7.2.
ActiveStorage::Blob#compose Now Supports Custom Blob Key in Rails 7.2. [more inside]
Monitor the Performance of Your Ruby on Rails Application Using AppSignal
In the second part of this two-part series, we’ll use AppSignal to monitor the performance of our Ruby on Rails application: https://blog.appsignal.com/2024/06/12/monitor-the-performance-of-your-ruby-on-rails-application-using-appsignal.html
Memory management in Ruby 💎
Ruby, is hiding you the complexities of this task https://mathieu-eustachy.com/articles/memory-management-explained-in-ruby
ActiveStorage::Blob#compose Now Supports Custom Blob Key in Rails 7.2.
Rails 7.2 allows to add custom blob key in the ActiveStorage::Blob APIs [more inside]