使用 RightScale right_aws GEM 的 Sqs 与 SqsGen2
我正在尝试将 right_aws (1.10.0) GEM 与 Rails 一起使用,并且我已将问题简化为 3 行 irb 会话。以下方法
require 'rubygems'
require 'right_aws'
sqs = RightAws::Sqs.new("xxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
有效,但失败并出现
require 'rubygems'
require 'right_aws'
sqs = RightAws::SqsGen2.new("xxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
NameError: uninitializedconstant RightAws::SqsGen2
。我在 GEM 源代码中看到了类定义,文档很旧,但似乎很准确,但我无法弄清楚我做错了什么。
当您这样做时,如果我正在构建新的东西,我是否有任何理由想要使用旧的界面?
I'm trying to use the right_aws (1.10.0) GEM with Rails, and I've reduced my problem to a 3-line irb session. The following works
require 'rubygems'
require 'right_aws'
sqs = RightAws::Sqs.new("xxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
while this fails
require 'rubygems'
require 'right_aws'
sqs = RightAws::SqsGen2.new("xxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
with NameError: uninitialized constant RightAws::SqsGen2
. I see the class definition in the GEM source, the documentation is old but seems accurate, but I can't figure out what I'm doing wrong.
And while you're at it, is there any reason if I'm building something new, I'd want to use the older interface?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用什么版本的 Rails?也许尝试检查最新版本的 aws gem(2.4.4)?
What version of Rails are you using? Maybe try to check latest versions of aws gem(2.4.4)?