Why can't the Bundler find this stone?

Why can't bundler find the Mechanize gem?

My Rails Gemfile project shows the following:

gem 'mechanize', :git => 'git://github.com/tenderlove/mechanize.git'

Starting package installation causes the following error:

Updating git://github.com/tenderlove/mechanize.git
Fetching source index for http://rubygems.org/
Could not find gem 'mechanize (>= 0)' in git://github.com/tenderlove/mechanize.git (at master).
Source does not contain any versions of 'mechanize (>= 0)'

I came to this problem after you drew a project to make small changes, but could not get a binder to use the github location or local path. Why can't he find the stone?

If I delete all the instructions and just do it gem 'mechanize', then it works flawlessly.


Versions: Bundler 1.0.14 + Rails 3.1 Release Canditate + Ruby 1.8.7 (via RVM) + Debian 5

+3
source share
5 answers

, gemspec, .

/ . mechanize.gemspec. Gemfile, - .

gem 'mechanize',            :path => 'vendor/gems/mechanize'
+6

bundler, git:// URL-.

bundler; git:// http://?

+1

- , , .

, , .gemspec:

rake debug_gem | grep -v "(in " > `basename \`pwd\``.gemspec

, gemspec .gemtest, .

Gemfile :

gem 'mechanize', :path => '/my_rails_app/vendor/gems/mechanize'

Then I ran bundle install and everything went smoothly.

+1
source

Use the version explicitly. They do not support unreleased versions, so they delete the gemspec file.

gem 'mechanize', '2.0.1'

This works for me.

+1
source

I ran into the same problem, I changed by adding a gem version between the name and the path.

gem 'image_core', '0.0.1' ,: path => './lib/engine/image_core'

0
source

All Articles