rails console error due to credentials.yml.enc configuration

Asked 1 years ago, Updated 1 years ago, 475 views

In this question, either Cloudinary or database was searching for a problem, and the credentials.yml.enc configuration was a problem, and a new problem appeared.
In this configuration,

Configuring credentials.yml.enc: 1

#cloudinary:
cloud_name —dnjhb66ti
api_key —195688713482412
api_secret —iw3rQu616JzDCL0-qxM-AarC6X0

I'm using
in Cloudinary.yml. <%=Rails.application.credentials.cloudinary[:cloud_name]%>
cannot be substituted for .
So,

Configuring credentials.yml.enc: 2

cloudinary:
  cloud_name —dnjhb66ti
  api_key —195688713482412
  api_secret —iw3rQu616JzDCL0-qxM-AarC6X0

I tried to make sure it was configured in rails console by setting it to
The following error occurred and could not be verified.

/home/ubuntu/.rvm/gems/ruby-3.0.0/gems/cloudinary-1.0.85/lib/cloudinary/helper.rb:254:in `block included': undefined method `alias_method_chain' for ActionView: Base: Class
Did you mean?alias_method(NoMethodError)

I am investigating this error, but it is difficult to determine the cause.
Setting credentials.yml.enc: Is it wrong to write 2?
Or is the description of other files disturbing me?

ruby-on-rails ruby

2023-02-28 21:12

1 Answers

I am investigating this error, but it is difficult to determine the cause.

If you google with alias_method_chain, alias_method_chain is an old method that was deprecated around Rails 5 and was deleted
https://railsguides.jp/5_0_release_notes.html#%E9%9D%9E%E6%8E%A8%E5%A5%A8
https://github.com/rails/rails/issues/46705

The cloudinary gem version seems to be 1.0.85, but I think it's because it's too old.Use the latest one.


2023-02-28 23:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.