如何将新的 gem 集成到 Rails 应用程序中 (Redmine)

发布于 2024-10-07 19:20:11 字数 589 浏览 1 评论 0原文

我开发了一个 gem,它实现了我们将在 Redmine (Rails 2.3.5) 部署中使用的一些算法。

gem 由 Jeweler 搭建起来,它创建一个 Rakefile 来生成 .gemspec 文件。

但是,当我复制到 vendor/gems 并运行 script/console 时,我收到以下警告:

config.gem: Unpacked gem cedrux_algorithms in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem cedrux_algorithms in vendor/gems not in a versioned directory. Giving up.

当我运行命令 rake gems:refresh_specs 时>,我收到同样的消息。如何在 Redmine 的 vendor/gems 中正确“安装”gem?

I have developed a gem which implements some algorithms that we'll use within a deployment of Redmine (Rails 2.3.5).

The gem was scaffolded with jeweler, which creates a Rakefile to generate the .gemspec file.

However, when I copied to vendor/gems and I run script/console I get the following warning:

config.gem: Unpacked gem cedrux_algorithms in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem cedrux_algorithms in vendor/gems not in a versioned directory. Giving up.

When I run the command rake gems:refresh_specs, I get the same messages. How can I properly "install" a gem within the vendor/gems in Redmine?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

三生路 2024-10-14 19:20:11

这是通过在 vendor/gems 目录中解压 gems 来完成的:

$ cd RAILS_ROOT/vendor/gems
$ gem unpack the_gem
$ cd ../..
$ rake gems:refresh_specs

This is accomplished by unpacking the gems on the vendor/gems directory:

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