Ruby 命令行:未定义的局部变量或方法

Ruby 命令行:未定义的局部变量或方法,ruby,Ruby,我得到了以下代码: require 'base64' def Decrypt(rsaCipher, encryptedValue) print base64.decode64(encryptedValue) end Decrypt("a", "b") 我在“Decrypt”中得到错误消息:main:Object(namererror)的未定义局部变量或方法“base64”。我做错了什么?即使我包含了base64库,为什么Ruby没有检测到它?它应该是base64,而不是base64。它

我得到了以下代码:

require 'base64'

def Decrypt(rsaCipher, encryptedValue)
  print base64.decode64(encryptedValue)
end

Decrypt("a", "b")

我在“Decrypt”中得到错误消息
:main:Object(namererror)
的未定义局部变量或方法“base64”。我做错了什么?即使我包含了
base64
库,为什么Ruby没有检测到它?

它应该是
base64
,而不是
base64
它应该是
base64
,而不是
base64。谢谢竞选总统。谢谢逃窜