gpt4 book ai didi

ruby-on-rails - 如何解决 "key not found: :ciphers"?

转载 作者:行者123 更新时间:2023-12-04 05:35:29 27 4
gpt4 key购买 nike

我对Rails感到非常生疏,我认为自从使用7年来,它发生了很多变化。

我正在尝试设置此示例应用程序:https://iridakos.com/news/2015/06/21/rails-sample-api-ui

我面临的问题是UI无法与API正确交互。我在下面的屏幕截图中得到了错误。

lofocats UI应用程序为我提供了以下堆栈跟踪:

KeyError (key not found: :ciphers):
lib/api/resource.rb:39:in `execute'
app/models/cat_entry.rb:46:in `all'
app/controllers/cat_entries_controller.rb:9:in `index'
app/controllers/application_controller.rb:44:in `set_api_authentication_token'

application_controler.rb中的第44行是begin块的第一行( Api::Configuration.current_authentication_token = session[:user_information][:authentication_token] if is_user_signed_in?):
def set_api_authentication_token
begin
Api::Configuration.current_authentication_token = session[:user_information][:authentication_token] if is_user_signed_in?
yield
ensure
# Always nullify the token after each action.
Api::Configuration.current_authentication_token = nil
end
end

我不确定如何解决此错误。我以前没看过,搜索SO可以提供一些Cloudinary特定的答案。

screenshot of error

最佳答案

您如何与API交互?您正在使用一些 gem 吗?当我使用过时的rest-client gem时,我也收到类似的消息错误。从1.X更新为2.X解决了问题。
NoMethodError (undefined method `response' for #<KeyError: key not found: :ciphers>)
也许一些使用过时的rest-client gem 的 gem ?这是我的问题(如果我没记错的话),我 fork 了仓库并更新了依赖项

关于ruby-on-rails - 如何解决 "key not found: :ciphers"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55616274/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com