Skip to content

Instantly share code, notes, and snippets.

@rsutphin
Created May 13, 2010 23:19
Show Gist options
  • Save rsutphin/400611 to your computer and use it in GitHub Desktop.
Save rsutphin/400611 to your computer and use it in GitHub Desktop.
Gem::Specification.new do |s|
s.name = "A"
s.version = "0.0.0"
s.summary = "Gem A"
end
gem 'A', :path => File.expand_path('../../a', __FILE__)
+ 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
#!/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
#!/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
@rsutphin
Copy link
Author

Looks like github strips the paths when it shows the filenames here. They are intact if you clone it, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment