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

时间:2010-12-16 15:57:51

标签: ruby-on-rails redmine

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

宝石是用珠宝商搭建的,它创建了一个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内正确“安装”某个宝石?

1 个答案:

答案 0 :(得分:0)

这是通过在vendor/gems目录中解压缩来实现的:

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