正在尝试将Rails 3中的gem捆绑销售,但Gem没有Gemspec [英] Attemping to vendorize a gem into bundler with Rails 3, but Gem has no Gemspec

查看:101
本文介绍了正在尝试将Rails 3中的gem捆绑销售,但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'

然后在我的Gemfile中添加以下行:

And then in my Gemfile I add this line :

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文件。有没有办法为它建立一个?

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 ?

推荐答案

我忘了把版本留在我的宝石上!超级重要:

I forgot to leave the version out on my Gem! Super important :

gem "spree_easy_contact", '1.0.2', :path => "#{File.expand_path(__FILE__)}/../vendor/gems/spree_easy_contact-1.0.2"



这也是奇怪的。这个Gem也需要蜜罐验证码,所以我必须将它包含在我的Gemfile中。一切都很好。

Also it was strange..this Gem also require honeypot-captcha, so I had to include that in my Gemfile. All is well.

这篇关于正在尝试将Rails 3中的gem捆绑销售,但Gem没有Gemspec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆