开发者

Attemping to vendorize a gem into bundler with Rails 3, but Gem has no Gemspec

开发者 https://www.devze.com 2023-02-10 04:00 出处:网络
Following these easy steps: gem unpack spree_easy_contact -v 1.0.2 --target ven开发者_如何学JAVAdor/gems

Following these easy steps:

gem unpack spree_easy_contact -v 1.0.2 --target ven开发者_如何学JAVAdor/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 ?


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"

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


You can try this solution:

http://makandra.com/notes/538-freeze-vendor-unpack-a-single-ruby-gem-with-and-without-bundler

0

精彩评论

暂无评论...
验证码 换一张
取 消