Team Qameta ruby on rails

Use Geocoder and MaxMind DB to Geocode IP Addresses

Utilizing IP addresses for communication is a fundamental aspect of many web applications employing HTTP(S) as their protocol, particularly those interconnected to the internet. However, a multitude of IP addresses are also generated through protocols such as SSH, SMTP, or IMAP.

Default URL Options in Ruby on Rails

Like most Ruby developers you have to set a default_url_options on a Ruby on Rails project. Depending on the use case you have to set several of them with different values. The name of the method default_url_options is the same, but it is used in different contexts (controller, mail, or file storage, it may be confusing and can even have side effects for your project you have to figure out yourself.

Working with Legacy Ruby on Rails: spring.gem fork() Crash

Working with legacy Ruby on Rails applications is for most developers a problem, as they have a lot of extra work to do: Use older documentation, which matches the legacy project can’t use fixes and improvements of programming language can’t use improvements and features of up-to-date framework version have to use older and mostly unsupported third-party extensions are maybe forced to write code, which must be changed for updates and upgrades First of all, many developers will hit the CPU architecture change from x86/x64 to ARM64 using Apple Macs.

Analyzing SassC::SyntaxError in Ruby on Rails 7.0

I was running a up to date Ruby on Rails 7.0 project using cssbundling-rails. The project was in production for several months. After pushing the code to Continuous Integration (CI) using GitHub Actions it failed with an error: $ sass .

Deploy Ruby on Rails 7.0 to Dokku micro PaaS

This tutorial was tested with Dokku version 0.32.3 Deploying a Ruby on Rails application to a Dokku instance is pretty forward. There are only a few things you have to consider. In this guide, I will tell you, what might be the things and how to solve them.

Fixing require LoadError as an example for the matrix gem

Some gems like matrix or rexml were added at some point to ruby becoming so-called default gems. But they may be removed from being default in newer ruby versions, resulting in broken builds like for us with prawn: bin/rails c 'require': cannot load such file -- matrix (LoadError) In most such cases you have to update the used gem (for us prawn) to a newer version, which defines the missing gem as required for this ruby version.

Fix Flaky Rails System Tests caused by slow scrolling or animations

Flakiness on browser-based system tests (integration tests) in Ruby on Rails may have a lot of different reasons. One is scrolling, which may be slowed down by browser setup (smooth scrolling), JavaScript callbacks which result in some kind of events like for animations, etc.

Howto migrate from Webpacker to jsbundling-rails in Ruby on Rails

A lot of Ruby on Rails applications created with Ruby on Rails version 5.x or 6.x or even upgraded from the previous versions are using webpacker as their primary asset pipeline. But now as webpacker has retired, it is time to move on.

Howto migrate from Webpacker to cssbundling-rails in Ruby on Rails for CSS

A lot of Ruby on Rails applications created with Ruby on Rails version 5.x or 6.x or even upgraded from the previous versions are using webpacker as their primary asset pipeline. But now as webpacker has retired, it is time to move on.

Howto remove sprockets-rails from you Ruby on Rails project

Before removing sprockets-rails from dependencies of your Ruby on Rails project, check whether you are surfing images or fonts using sprockets through assets paths like: app/assets/images app/assets/fonts … or any other assets except Style Sheets (CSS): app/assets/js If you are using cssbundling-rails the sprockets default path for Style Sheets is used by default:

Define Default URL for ActiveStorage to fix Mixed Content Error

Using ActiveStorage with external services like AWS S3 for saving and surfing attachments like images is great. The setup is well explained in Active Storage Overview in Ruby on Rails Guides. But if you start using it, you will maybe encounter some problems, which are not that easy to find or debug, as they mostly appear in production.