Search code examples
ruby-on-railsrubygemsbundlergemspecs

Attemping to vendorize a gem into bundler with Rails 3, but Gem has no 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 ?


Solution

  • 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.