Skip to content

Instantly share code, notes, and snippets.

@harto
Last active August 29, 2015 14:15
Show Gist options
  • Save harto/0dfcee489e248900feb8 to your computer and use it in GitHub Desktop.
Save harto/0dfcee489e248900feb8 to your computer and use it in GitHub Desktop.
Reproduce apparent Bundler issue
#!/bin/bash
set -euo pipefail
ISSUE=bundler-path-source-conflict
TMPDIR="/tmp/${ISSUE}"
mkdir -p "$TMPDIR"
cd "$TMPDIR"
mkdir -p local_gem
cat > local_gem/Gemfile <<EOF
gemspec
EOF
cat > local_gem/local_gem.gemspec <<EOF
Gem::Specification.new do |s|
s.name = "local_gem"
s.version = "0.0.1"
end
EOF
cat > Gemfile <<EOF
source "https://rubygems.org"
gem "local_gem", path: "local_gem"
gem "hello-world", source: "https://rubygems.org"
EOF
bundle install
# Expect output:
# hello
# Actual output:
# Could not find hello-world-1.2.0 in any of the sources
# Run `bundle install` to install missing gems.
bundle exec ruby -e 'puts "hello"'
@pda
Copy link

pda commented Feb 17, 2015

You could replace irb with ruby -e 'puts :ok' as the test case, to further isolate the reproduction.

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