Created
May 13, 2010 23:19
-
-
Save rsutphin/400611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Specification.new do |s| | |
s.name = "A" | |
s.version = "0.0.0" | |
s.summary = "Gem A" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'A', :path => File.expand_path('../../a', __FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ bundle --version | |
Bundler version 0.9.25 | |
+ cd b | |
+ bundle install | |
Using A (0.0.0) from source code at /private/tmp/bundler-issue/a Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
+ ruby problem.rb | |
Expected: /private/tmp/bundler-issue/a | |
Actual: /private/tmp/bundler-issue/a | |
*** So everything's okay | |
+ bundle lock | |
Your bundle is now locked. Use `bundle show [gemname]` to list the gems in the environment. | |
+ ruby problem.rb | |
Expected: /private/tmp/bundler-issue/a | |
Actual: /private/tmp/bundler-issue/gems/A-0.0.0 | |
--- So you see the problem | |
+ cd .. | |
+ rm -rf b/.bundle | |
+ rm b/Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
Bundler.setup | |
expected_gem_path = File.expand_path("../../a", __FILE__) | |
actual_gem_path = Gem.loaded_specs.values.find { |ls| ls.name == 'A' }.full_gem_path | |
puts "Expected: #{expected_gem_path}" | |
puts " Actual: #{actual_gem_path}" | |
if expected_gem_path == actual_gem_path | |
puts " *** So everything's okay" | |
else | |
puts " --- So you see the problem" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
bundle --version | |
cd b | |
bundle install | |
ruby problem.rb # no problem | |
bundle lock | |
ruby problem.rb # problem | |
# reset | |
cd .. | |
rm -rf b/.bundle | |
rm b/Gemfile.lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like github strips the paths when it shows the filenames here. They are intact if you clone it, though.