Native vs Cross-platform App Development: How to Pick

There are 4.4 million apps available on both the Appstore and Google Play, aimed at the world’s 14 billion mobile phones. If you want to create a mobile app, one of the most crucial decisions you must make is whether to use native or cross-platform mobile development.

MVP for Startups: Why You Need It During Custom Software Development

When you’re scrolling through your favorite mobile apps on your phone or browsing through your favorite website, it’s easy to forget that many of them started the same way… with a simple idea that evolved over time.

Rails 5 -> 6 Upgrade: Fixing subdomain issues

During the process of upgrading a Rails 5 staging app to Rails 6, we encountered a few errors, caused by running on a subdomain. The homepage rendered correctly, however, the Omniauth sign in button caused an error.

Identifying and Testing Database Performance Issues in Ruby on Rails

Database performance is a crucial factor that dictates the overall performance of your application. This article will look into ways that can be useful in identifying some database performance issues, and testing database performance.

5 Advantages of Custom Software Development

Individuals in almost any industry appreciate when a product or service can be personalized. That sentiment holds true in the field of information technology as well. As a result, custom software development has arisen to meet this need.

Capistrano GitHub Authentication using Personal Access Tokens

Capistrano can deploy from various code hosting platforms. GitHub is one of the most popular hosting platforms and allows you to clone repos with SSH or HTTPS. This guide focuses on HTTPS. To deploy via HTTPS you’ll need a Personal Access Token, this guide explains how Personal Access Tokens are created and why they’re used in place of passwords.

Nginx configuration for multiple Rails apps

Nginx is a popular web server for Rails apps. Typically you’d have one Nginx file per application. However, you may want to run multiple Rails apps on a single server, for rapid prototyping. In this case, you can make do with a single Nginx file.

Rails 7.0 adds association checking with the associated method

Rails 7.0 brings a lot of improvements to the table.

Rails 7 adds query scheduling in the background thread pool

Query scheduling is a feature of Rails that allows you to control the order in which database queries are executed.

Handling SQLite with Capistrano

SQLite is very useful for rapid prototyping. It’s commonly used locally but it can also be used on remote servers. If you’re using Capistrano to manage server deployments then you’ll need to handle SQLite’s database file.

Rails 5 -> 6 Upgrade: Active Storage config in Production

Whilst upgrading a Rails 5 app to Rails 6 (the Rails 7 upgrade is soon to follow) we discovered an issue when running the app in production mode:

Rails 5 -> 6 Upgrade: Fixing render file occurrences

We recently upgraded a Rails 5 app to Rails 6 (the Rails 7 upgrade is soon to follow) and discovered render file no longer works with erb files. The app was using render file to display a custom 401 error page, with dynamic content:

Updating Omniauth from version 1 to 2

We recently updated a Rails app from Omniauth 1 to 2. We did some research and used the Omniauth upgrade wiki. It looked complicated but in the end, there were only two changes required.

Upgrading Ruby, Bundler and Installing Rails 7

We’ve been working on upgrading a project to Rails 7. The app hadn’t been updated in a while, and it was running Ruby 2.6 and bundler 1.17. In order to do the Rails upgrade we had to do three things: Update Ruby, update Bundler & update Rails.

Rails 7.0 adds functionality to Assert a Single Record

Rails 7.0 has introduced two methods sole and find_sole_by that are used to query the database for a unique record based on the provided constraints. Assertions are one of the most useful tools in Ruby, and they’re even more useful when you use them to test your application’s data. By asserting that the data you got back from an object or collection is what you expect, you can ensure that your code works as expected.

Rails 7.0 adds encryption to Active Record

Adding an additional security layer in an application that handles sensitive data is definitely a necessity. Rails 7.0 introduces at-work encryption for sensitive attributes which protects against the exposure of personal information in the event a malicious party gains access to the database and is in a position to get a snapshot of it, as well as that of the application logs. The addition of encrypted attributes in ActiveRecord models is an extraction from HEY.

Ruby 3.1 introduces a new debugger

Ruby 3.1 ships with an entirely new rewritten debugger. Prior to this change, Ruby bundles lib/debug.rb that unfortunately was not maintained well. debug.gem is an entirely new replacement with great features that developers are sure to enjoy.

Ruby 3.1 experiments with YJIT

JIT (Just-In-Time) compiler was first introduced as an experimental feature in Ruby 2.6 with the intention of improving the performance of Ruby programs. Being experimental, memory-intensive workloads such as Rails application could not benefit from it at the moment of it’s introduction, despite achieving 1.7x faster performance as compared to Ruby 2.5.

Rails 7.0 makes Sprockets an optional dependency

Sprockets is a crucial Ruby library that is used to serve and compile web assets. However, in Rails 7.0 the library becomes an optional dependency unless the application needs to use Sprockets. In such situations, the sprockets-rails gem will have to be added to the Gemfile.

Rails 7.0 and merging ActiveRecord conditions

Rails 7.0 introduces a change that ensures conditions merged on the same column are not maintained, however, only the latter condition is retained.

Ruby 3.1 Introduces Fine-grained error location backtrace

Backtrace is very important when exceptions are raised. The sequential representation enables programmers to trace the exact location in their code where these exceptions are raised.

Rails 7 adds indefinite job retries

Rails 7 introduces a counter-fail measure in the ActiveJob framework. This is an indefinite job retries feature that would solve the different reasons why queued jobs would fail. Some of these reasons could be logical errors in the code, failure in the database, network issues, and queue malfunctions.

Running and Restarting a Rails Puma Webserver in Production

Let’s dive into how to run a Rails Puma webserver process and how to restart it.

Rails 7.0 replaces byebug with ruby/debug

Debugging information can help you understand what’s going on in your application. After Rails 5 and before Rails 7, the byebug gem was responsible for tracking the execution flow. It has been providing a way to view a complete backtrace of the code while working on the application. Rails 7 introduces debug as its default debugger.

Rails 7: PreviewError now raised in ActiveStorage

When ActiveStorage handles media uploads, the Poppler gem takes care of preview generation to be used all across the application. In previous versions of Rails, a failure in creating a preview would capture a 0-byte IO stream and send that to ActiveStorage. For instance, if a user uploaded a media file and the preview failed to generate, a 0-byte preview would still be stored and rendered, causing unexpected errors in the application.