读书人

Gemfile里引述没有gemspec的gem

发布时间: 2012-11-10 10:48:51 作者: rapoo

Gemfile里引用没有gemspec的gem
在Gemfile里引用一个没有gemspec的gem时,运行bundle install的时候会提示


Could not find gem 'mechanize (>= 0)' in git://github.com/mvj3/mechanize.git (at master).
Source does not contain any versions of 'mechanize (>= 0)'


解决方案: 指定gem的版本即可,如 gem 'mechanize', '2.0', :git => 'git://github.com/mvj3/mechanize.git'

参考:http://stackoverflow.com/questions/4971074/attemping-to-vendorize-a-gem-into-bundler-with-rails-3-but-gem-has-no-gemspec

引用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.

读书人网 >编程

热点推荐