在 Windows 上创建本地 Ruby Gem 存储库

发布于 2024-10-12 06:28:52 字数 694 浏览 2 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羞稚 2024-10-19 06:28:52

当您引用安装程序时,没有MSI包,是RubyInstaller团队提供的可执行安装程序。

现在,关于您收到的错误,您之前是否尝试卸载 builder 3.0.0?

就我而言:

C:\Foo>tree
Folder PATH listing for volume Keore HD
Volume serial number is FC6C-E785
C:.
└───gems

其中 gems 包含 rake-compiler-0.7.5.gem 并安装了以下构建器 gem:

>gem list builder

*** LOCAL GEMS ***

builder (2.1.2)

执行 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:

C:\Foo>tree
Folder PATH listing for volume Keore HD
Volume serial number is FC6C-E785
C:.
└───gems

Where gems contains rake-compiler-0.7.5.gem and having the following builder gem installed:

>gem list builder

*** LOCAL GEMS ***

builder (2.1.2)

Doing gem generate_index -d C:\Foo works using ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文