尝试使用Rails 3将gem商品化为捆绑包,但Gem没有Gemspec

Tri*_*rip 7 gem ruby-on-rails bundler gemspecs

按照以下简单步骤:

gem unpack spree_easy_contact -v 1.0.2 --target vendor/gems

Unpacked gem: '../vendor/gems/spree_easy_contact-1.0.2'
Run Code Online (Sandbox Code Playgroud)

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

gem "spree_easy_contact", :path => "vendor/gems/spree_easy_contact-1.0.2"
Run Code Online (Sandbox Code Playgroud)

但是当我跑步时它失败了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)'
Run Code Online (Sandbox Code Playgroud)

我相信这是因为gem中没有gemspec文件.有没有办法为它建立一个?

有人知道解决这个问题的方法吗?

Tri*_*rip 12

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

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

还奇怪..这个Gem也需要honeypot-captcha,所以我必须在我的Gemfile中包含它.一切都很好.