尝试使用 Rails 3 将 gem 供应到捆绑器中,但 Gem 没有 Gemspec
遵循这些简单的步骤:
gem unpack spree_easy_contact -v 1.0.2 --target vendor/gems
Unpacked gem: '../vendor/gems/spree_easy_contact-1.0.2'
然后在我的 Gemfile 中添加这一行:
gem "spree_easy_contact", :path => "vendor/gems/spree_easy_contact-1.0.2"
但是当我运行 bundle install
时,它失败了。
Could not find gem 'spree_easy_contact (>= 0, runtime)' in source at vendor/gems/spree_easy_contact-1.0.2.
Source does not contain any versions of 'spree_easy_contact (>= 0, runtime)'
我相信这是因为 gem 中没有 gemspec 文件。有没有办法为其构建一个?
有人知道解决这个问题的方法吗?
Following these easy steps:
gem unpack spree_easy_contact -v 1.0.2 --target vendor/gems
Unpacked gem: '../vendor/gems/spree_easy_contact-1.0.2'
And then in my Gemfile I add this line :
gem "spree_easy_contact", :path => "vendor/gems/spree_easy_contact-1.0.2"
But it fails when I run bundle install
.
Could not find gem 'spree_easy_contact (>= 0, runtime)' in source at vendor/gems/spree_easy_contact-1.0.2.
Source does not contain any versions of 'spree_easy_contact (>= 0, runtime)'
I believe this is because there is no gemspec file located in the gem. Is there a way to build one for it ?
Anyone know a way to get around this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我忘了把版本留在我的 Gem 上!超级重要:
这也很奇怪......这个 Gem 还需要蜜罐验证码,所以我必须将其包含在我的 Gemfile 中。一切都很好。
I forgot to leave the version out on my Gem! Super important :
Also it was strange..this Gem also require honeypot-captcha, so I had to include that in my Gemfile. All is well.
您可以尝试以下解决方案:
http://makandra.com/notes/538-freeze-vendor-unpack-a-single-ruby-gem-with-and-without-bundler
You can try this solution:
http://makandra.com/notes/538-freeze-vendor-unpack-a-single-ruby-gem-with-and-without-bundler