Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试Gem::Package::TarWriter在 Heroku上使用
Gem::Package::TarWriter
Gem::Package::TarWriter.new(tar_str) do |writer|
以错误结束:
uninitialized constant Gem::Package
但一切都在本地工作。
一篇文章对此进行了解释:“当 ruby 本身以非管理员身份安装时,您正在从以管理员身份打开的命令窗口运行 gem install”(反之亦然)。
好的,但我无法完全控制 Heroku。
老问题,但是当我遇到一个uninitialized constant Gem::Package.
就我而言,require 'rubygems/package'这是需要的。在某些时候这不是必需的,但现在它是。
require 'rubygems/package'