On a recent project at Hashrocket, we had to use dblink in production as part of our set up for communicating with a legacy database. While our overall experience was positive, we had a couple of hiccups along the way. Let's talk about the lessons we learned! What is dblink? dblink is a Postgres command that allows you to connect to and execute queries on a remote database. There are a number of dblink-related commands in Postgres depending on your use case (from dblink_connect to dblink_exec...| Hashrocket
This year at the final RailsConf, the atmosphere was incredibly nostalgic and celebratory, if perhaps a little bittersweet. Many of the talks spent time looking back on how far we've come, including Robby Russell's "The Rails Features We Loved, Lost, and Laughed At". Robby's talk brought back to light an old library that I hadn't thought about or used in years, ActiveResource. Once it was mentioned, it seemed like it kept cropping up during the conference, from DHH's fireside chat, to convers...| Hashrocket
Generators are one of the many excellent tools that Rails provides. They can be used for a wide range of tasks, from plugging a gem into your app to scaffolding files. You can also build generators to meet your specific needs.| hashrocket.com
A fantastic feature of Turbo Rails is the ability to broadcast changes to a page. Each connected client can receive changes in real-time. However, it's a common problem to update content that is shown to many users, but the rendering of items is affected by user context. A recommendation to get around this is to only broadcast things that don't require that user context. Because we have Turbo, we can serve user-specific content in other ways. Let's examine our setup, and I'll explain how we c...| Hashrocket
Last week, I had the incredible opportunity to attend Rails World 2024 in Toronto. The conference was just another amazing moment for the Rails community. With a great focus around Rails 8 and Kamal 2.0, among many other things, it was amazing to hear talks around these new releases and learn about the potential of upgrading to Rails 8 in our own projects. The conference kicked off with a fantastic keynote by DHH that truly fired up the crowd of over 1,000 attendees. His energy and vision for...| Hashrocket
The power of Rails with Turbo and Stimulus. With the imminent release of Rails 8 and the exciting new version of Hotwire's Turbo library, the buzz around Rails has been growing. Hotwire, which stands for 'HTML Over The Wire', encompasses the Turbo, Stimulus, and Strada libraries. Rails has integrated Turbo and Stimulus into the framework, providing a wealth of modern, high-speed functionality. Let's explore how these new additions, combined with some classic features, can make Rails the perfe...| Hashrocket
What I've learned (Sometimes the Hard way) about discussing technical problems with less technical clients. We use many technical terms as developers and consultants, confusing clients who need to become more familiar with them. If a client is non-technical, assuming they may need to be more familiar with our jargon can be helpful. Here are a few small items that have helped me communicate more effectively with non-technical clients. Break Down Concepts When discussing complex technical conce...| Hashrocket
Tailwind has a pretty neat way to style children and sibling elements by using what are known as group and peer identifiers. So without further ado, let's jump into how we can use these. Note: I have omitted some classes in these examples that don't have anything to do with the examples, so that the code you see is only relevant to groups and peers. Table of Contents • Styling based on the parent element • Styling based on sibling elements • Differentiating Identifiers • Order Matters...| Hashrocket
I recently got the chance to build a small internal tool for our team. And when it came time to deploy, I really wanted to try out Kamal, the new deployment tool built by Basecamp (37Signals). It was easier than I had first anticipated. Kamal is a CLI and deployment scripting tool that allows you to setup servers and subsequently deploy your app to them. You can use this to deploy many types of applications, you just need a Dockerfile and some changes to Kamal's configuration. It's different ...| hashrocket.com
2 easy to implement solutions for validating JSON in your text editor| hashrocket.com