Team Qameta ruby
Using IP addresses to communicate is an essential part of most web applications using HTTP(S) as a protocol. This is especially interesting for applications connected to the internet. But you get also a lot of IPs from protocols like SSH, SMTP, or IMAP.
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 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.
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 .
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.
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.
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.
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.
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.
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:
Recently RuboCop started to blame my assert something.booked? style tests in minitest and telling me this:
Minitest/AssertPredicate: Prefer using `assert_predicate(something, :booked?)`. I’ve looked for the corresponding Pull Request and also checked the final Rubocop Minitest Style Guide: Assert Predicate.
According to the documentation, we can read: