Last active
August 29, 2015 14:15
-
-
Save harto/0dfcee489e248900feb8 to your computer and use it in GitHub Desktop.
Reproduce apparent Bundler issue
This file contains hidden or 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 | |
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"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could replace
irb
withruby -e 'puts :ok'
as the test case, to further isolate the reproduction.