Rails Log Level Configurable Via RAILS_LOG_LEVEL In Production
In the latest version of Rails, the production config file comes with logging which is configurable based on an environment variable.
In the latest version of Rails, the production config file comes with logging which is configurable based on an environment variable.
Ruby 3.2 introduces the new feature syntax_suggest
, formerly known as the gem dead_end
, now integrated into Ruby. Catch and fix syntax errors are now more robust helping you to find the position of errors such as missing extra parentheses, commas, superfluous ends, errors such as missing or extra curly braces related to string interpolation, and semicolons.
Heroku recieved some negative press for the removal of it’s free tier. Render is a cheaper alternative that boasts many benefits over Heroku. We believe Heroku is still the quickest way to spin up a Rails app but Render is close behind and less than half the price.
Ruby 3.2 brings a convenient new addition that enables combining elements from various arrays or enumerable objects with ease. Enumerator::Product
, one of the most convenient new methods, can be especially useful when working with large data sets or when generating combinations for testing purposes.
ActiveRecord is a core part of Rails, an ORM layer that sits on top of relational databases like Postgres or MySQL. However, it doesn’t natively support DynamoDB. Recently, we worked on a project to migrate part of a Rails app to Lambda functions. We began the migration by adding logic for writing to DynamoDB. Here’s how we did it.
As your Ruby on Rails application grows, it becomes important to monitor its performance and log its activities. This helps you identify and fix issues, and also gives you insights into how your application is being used. In this article, we will discuss how to implement monitoring and logging in Ruby on Rails, with code examples.
As a Ruby developer, you have probably used the map
method to transform arrays and other collections of data. But have you ever needed to transform an array and flatten the result in one go? This is where the flat_map
method comes in.
In Ruby 2.4, a new method called transform_values
was introduced to help transform hash values using a block. This method can be particularly useful when you need to modify the values in a hash without changing the keys.
Horizontal scaling is the process of adding more servers to handle increased traffic and user activity in your Ruby on Rails application. With horizontal scaling, you can handle more requests by distributing the load across multiple servers, rather than relying on a single server to handle all the traffic. In this article, we will discuss how to implement horizontal scaling in Ruby on Rails, with a code example.
In Rails 6.1, a new method called compact_blank
was introduced to help filter out nil
and blank elements from an array. This method can be particularly useful when working with form parameters, where some fields may be left blank or undefined.
Load balancing is an important technique for scaling Ruby on Rails applications to handle high traffic loads. In this article, we will discuss load balancing and some techniques for implementing it in Ruby on Rails, along with code examples.
Database optimization is an important aspect of building high-performance Ruby on Rails applications. In this article, we will discuss some techniques for optimizing database performance in Ruby on Rails, along with code examples.
Caching is a technique that can improve the performance of your Ruby on Rails application by storing frequently accessed data in memory or on disk. In this article, we will explore how to use caching in Ruby on Rails, and we will provide some code examples to illustrate the different types of caching available.
Building a Rails controller is simple and well documented. Follow the ‘Rails way’ and your life is easy. However, webhook endpoints require a different approach. In this post you’ll learn how to build maintainable and secure webhook endpoints.
Ruby on Rails is a popular web application framework that is widely used to develop complex web applications quickly and efficiently. One of the essential parts of developing a robust Ruby on Rails application is testing. Testing is crucial to ensure the application is working correctly and doesn’t have any bugs or errors that could lead to problems for users. In this article, we’ll discuss the best practices for testing Ruby on Rails applications, including unit testing, integration testing, and more.
Debugging Ruby on Rails applications can be a time-consuming and challenging task. In this article, we’ll explore some common issues that developers face and provide tips and tricks for solving them with code examples.
This tutorial explains how to send Slack messages from a Rails application.
This post explains how to iterate over the contents of an AWS S3 bucket and generate download links for each object. This example uses aws-sdk
version 2. At the time of writing, version 3 is the latest but there’s still a lot of legacy apps that use v2.
Recently, we worked on deploying a legacy Rails app to Heroku. The minimum Ruby version that Heroku supports is 2.7.6. Apps running older versions must be upgraded before they can be deployed. Thankfully, this problem can be solved by deploying the app as a container. This post explains how to containerize an application and deploy it to Heroku.
In part 1 we built an admin panel and used Turbo Streams to make revenue dynamic. In this post we’ll continue building out the admin panel. We’ll implement tabs, using Turbo Frames, then finish up by making ‘real time orders’ dynamic.
In this series we are building an admin panel, using Hotwire. The admin panel will have multiple tabs and plenty of interactivity. Let’s get started.
Recently, we encountered a bug with some Stimulus code. We were trying to stream updates for a small partial and found that data only refreshed on the first update.
A dedicated software development team is a collaborating model in which a client engages an outsourced team of project managers, software developers, QA testers, and other specialists offered by the software development vendor.
In part 1 we built a Stimulus controller that tests a regex, however, there is a problem with that solution. Ruby and JavaScript regex implementations are slightly different. In our case, we want users to verify their regex using Ruby’s regex implementation. To do that, we need to evaluate the regex on the server side.
Leaders in various industries are embracing digital tools to improve their firms. It could be to begin digital changes, support new remote workforce models, improve customer relations, or automate processes. Fortunately, software is now more widely available than ever. The power of choice, on the other hand, might be overwhelming. Furthermore, your technological decisions can mean the difference between falling behind or staying ahead in your sector.