Skip to content

Instantly share code, notes, and snippets.

@cupakromer
Created September 30, 2014 20:34
Show Gist options
  • Save cupakromer/b6d4322cb4cd0b65499e to your computer and use it in GitHub Desktop.
Save cupakromer/b6d4322cb4cd0b65499e to your computer and use it in GitHub Desktop.
Bundler binstubs + standalone problem
# With a clean project setup
$ bundle --binstubs --standalone
$ bundle binstubs rspec-core
$ cat bin/rspec
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('rspec-core', 'rspec')
$ cat .bundle/config
---
BUNDLE_PATH: bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
# With a clean project setup
$ bundle --binstubs --standalone
$ cat bin/rspec
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#
$:.unshift File.expand_path '../../bundle', __FILE__
require 'bundler/setup'
load File.expand_path '../../bundle/ruby/2.1.0/gems/rspec-core-3.1.4/exe/rspec', __FILE__
$ cat .bundle/config
---
BUNDLE_PATH: bundle
BUNDLE_BIN: bin
BUNDLE_DISABLE_SHARED_GEMS: '1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment