Cookie Consent by Free Privacy Policy Generator 📌 Ruby on Rails 4.2.X upgrade issue with meta_request — undefined method normalize_key


✅ Ruby on Rails 4.2.X upgrade issue with meta_request — undefined method normalize_key


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

You may find yourself in need to migrate from RoR 4.2.X to the latest version, and that can be quite a task. Facing the same problem, I would like to point out the issue that bugged me for quite a bit, and that is gem meta_request.

Now if you are not using it, this text is not for you, but if you are, you might find this post helpful.

So, initial situation: very old Ruby, very old Rails.

Next step(s): keep the Rails version, update Ruby (in this case to 2.6.0 or at least to 2.3.0)

Last step(s): update Rails to 5.0 and then to 6.0 and so on, by the book.

Updating Ruby went fine more or less, keep in mind that the Rails is still the same version, also bundle install yielded minor hiccups/errors but nothing that can’t be resolved.

But upon landing/opening home page I got

NoMethodError: undefined method normalize_key ActiveSupport::Cache::Store

Now normalize_key is Rails 5+ function, and I had 4.2.X, how the hell is that being called then?

The answer is meta_request!

Yes, bundler picked up latest possible version, since it says it is compatible with Rails(i.e. railties >= 3.0.0) and in it, meta_request on line uses normalize_key call, which is Rails 5 feature(from v5.0.0.1).

So to fix this issue just do:

gem 'meta_request', '~> 0.7.4'

until you bump your Rails to 5+.

Cheers!

...

✅ Ruby on Rails 4.2.X upgrade issue with meta_request — undefined method normalize_key


📈 145.88 Punkte

✅ CVE-2022-22213 | Juniper Junos OS/Junos OS Evolved RPD Undefined undefined values (JSA69717)


📈 43.39 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Ruby on Rails 3.0/4.0 rails-html-sanitizer Cross Site Scripting


📈 34.55 Punkte

✅ Identify unused Routes in Ruby on Rails before Rails 7.1 and with 7.1


📈 34.55 Punkte

✅ 🚀Ruby on Rails for beginners: build an online store with Rails


📈 34.55 Punkte

✅ CVE-2015-7578 | Ruby on Rails 3.0/4.0 rails-html-sanitizer cross site scripting (BID-81802 / XFDB-110101)


📈 34.55 Punkte

✅ CVE-2015-7579 | Ruby on Rails 3.0/4.0 rails-html-sanitizer cross site scripting (BID-81804 / XFDB-110102)


📈 34.55 Punkte

✅ Ruby on Rails pluck method


📈 33.08 Punkte

✅ Ruby on Rails 3.0.16/3.1.7/3.2.7 Helper Method select_tag cross site scripting


📈 33.08 Punkte

✅ "undefined this keyword variable" issue in JavaScript


📈 28.9 Punkte

✅ Low CVE-2020-36190: Rails admin project Rails admin


📈 24.32 Punkte

✅ Low CVE-2017-12098: Rails admin project Rails admin


📈 24.32 Punkte

✅ Security-Fixes für Ruby on Rails verfügbar


📈 22.39 Punkte

✅ Ruby on Rails 3.0/4.0 Action Pack Denial of Service


📈 22.39 Punkte

✅ CVE-2016-0751 | Ruby on Rails 3.0/4.0 Action Pack resource management (RHSA-2016:0296 / BID-81800)


📈 22.39 Punkte

✅ Ruby on Rails: Schwachstelle ermöglicht Cross-Site Scripting


📈 22.39 Punkte

✅ Ruby on Rails: Schwachstelle ermöglicht Umgehen von Sicherheitsvorkehrungen


📈 22.39 Punkte

✅ Ruby on Rails up to 1.1.0 denial of service [CVE-2006-4112]


📈 22.39 Punkte

✅ Using Async in Ruby on Rails for CSV export


📈 22.39 Punkte

✅ Building an Ruby on Rails MVP.


📈 22.39 Punkte

✅ Sprint 1: Introduction to Ruby on Rails


📈 22.39 Punkte

✅ Ruby on Rails 3.0/4.0 Action Controller Credentials Information Disclosure


📈 22.39 Punkte

✅ Ruby on Rails: Mehrere Schwachstellen


📈 22.39 Punkte

✅ Ruby on Rails: Schwachstelle ermöglicht Cross-Site Scripting


📈 22.39 Punkte

✅ Ruby on Rails: Schwachstelle ermöglicht Cross-Site Scripting


📈 22.39 Punkte

✅ DISSECTING RUBY ON RAILS 5 – BECOME A PROFESSIONAL DEVELOPER


📈 22.39 Punkte

✅ Monitor the Performance of Your Ruby on Rails Application Using AppSignal


📈 22.39 Punkte

✅ Simple Preferences to Any Resource with Ruby on Rails


📈 22.39 Punkte

✅ ActionMailer attachments in Ruby on Rails


📈 22.39 Punkte











matomo

Datei nicht gefunden!