在 Windows 上创建本地 Ruby Gem 存储库
我正在尝试在 Windows 机器上创建一个本地 gem 存储库,它只是一个文件夹,根本不涉及 Web 服务器。这样我就可以将存储库粘贴到 Windows 共享上,就像使用 Mercurial 或 Git 一样。
现在,当我尝试创建存储库时,出现以下错误:
C:\TestLocalrepo>gem generate_index -d
C:\TestLocalrepo ERROR: While
executing gem ... (RuntimeError)
Gem::Indexer requires that the XML Builder library be installed:
gem install builder
我已尝试运行 gem install builder,它安装正常(3.0.0),但仍然出现上述错误。
我在其他地方读到尝试安装我拥有的 builder-2.1.2.gem ,但这也没有什么区别。
安装详细信息:
操作系统:Windows 7 x64 Enterprise
ruby 1.9.2p0 (2010-08-18) [i386-mingw32] - 通过 msi 软件包安装。
关于如何让它发挥作用有什么建议吗?或者有其他方法可以创建 gem 存储库吗?
I am trying to create a local gem repository on a Windows box that is just a folder, no web server involved at all. This way I can stick the repository on a Windows share like you can with Mercurial or Git.
Now when I try to create a repo I get the following error:
C:\TestLocalrepo>gem generate_index -d
C:\TestLocalrepo ERROR: While
executing gem ... (RuntimeError)
Gem::Indexer requires that the XML Builder library be installed:
gem install builder
I have tried running gem install builder which installs ok (3.0.0) but I still get the above error.
I read somewhere else to try installing builder-2.1.2.gem which I have but that also made no difference.
Setup Details:
OS: Windows 7 x64 Enterprise
ruby 1.9.2p0 (2010-08-18) [i386-mingw32] - installed via msi package.
Any suggestion on how to get this to work? Or is there another way I can create a gem repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您引用安装程序时,没有MSI包,是RubyInstaller团队提供的可执行安装程序。
现在,关于您收到的错误,您之前是否尝试卸载 builder 3.0.0?
就我而言:
其中
gems
包含rake-compiler-0.7.5.gem
并安装了以下构建器 gem:执行
gemgenerate_index -d C:\Foo
使用 ruby 1.9.2p136 (2010-12-25) [i386-mingw32]When you refer to the installer, there is no MSI package, is an executable installer provided by RubyInstaller team.
Now, in relation to the error you're receiving, did you try uninstall builder 3.0.0 before?
In my case:
Where
gems
containsrake-compiler-0.7.5.gem
and having the following builder gem installed:Doing
gem generate_index -d C:\Foo
works usingruby 1.9.2p136 (2010-12-25) [i386-mingw32]