Gemfile 中的 Jeweler 和 gemspec 可以一起工作吗?
我在 Gemfile 中使用 gemspec
并使用 Jeweler 时遇到问题:
sudo gem install
pkg/revertible_paper_trail-0.3.0.gem
Fetching: revertible_paper_trail-0.3.0.gem (100%)
ERROR: Error installing pkg/revertible_paper_trail-0.3.0.gem:
revertible_paper_trail requires revertible_paper_trail (>= 0)
rake gemspec:debug
显示已添加此内容:
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<revertible_paper_trail>, [">= 0"])
删除 gemspec
时从 Gemfile 中,运行时依赖性消失并且安装 gem 可以工作。
现在,使用珠宝商和捆绑商时的最佳实践是什么?
仅供参考:gem 的代码位于 https://github.com/CyTeam/revertible_paper_trail
I've got a problem when using gemspec
in my Gemfile and using jeweler:
sudo gem install
pkg/revertible_paper_trail-0.3.0.gem
Fetching: revertible_paper_trail-0.3.0.gem (100%)
ERROR: Error installing pkg/revertible_paper_trail-0.3.0.gem:
revertible_paper_trail requires revertible_paper_trail (>= 0)
rake gemspec:debug
shows that this got added:
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<revertible_paper_trail>, [">= 0"])
When dropping gemspec
from the Gemfile, the runtime dependency vanishes and installing the gem works.
Now, what's best practice when using jeweler and bundler?
FYI: The code for the gem is at https://github.com/CyTeam/revertible_paper_trail
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
gem install
与捆绑器或您的 Gemfile 无关,所以这个问题非常令人困惑。 (顺便说一句,您的代码链接会转到 404 页面。)gem install
has nothing to do with bundler or your Gemfile, so this question is very confusing. (BTW, your code link goes to a 404 page.)停止使用
jeweler
并维护您自己的<代码>.gemspec。Stop using
jeweler
and just maintain your own.gemspec
.