Skip to content

Commit dcfd9c1

Browse files
committed
Add bundler to list of binstubs; specify Gemfile
1 parent b434718 commit dcfd9c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Rakefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace :generate do
6565
in_example_app do
6666
sh "./travis_retry_bundle_install.sh 2>&1"
6767
# Rails 4 cannot use a `rails` binstub generated by Bundler
68-
sh "bundle binstubs rspec-core rake --force"
68+
sh "bundle binstubs bundler rspec-core rake --force"
6969
sh "bundle binstubs railties" unless File.exist?("bin/rails")
7070

7171
application_file = File.read("config/application.rb")
@@ -94,6 +94,7 @@ def in_example_app(*command_opts)
9494
end
9595
Dir.chdir(app_dir) do
9696
Bundler.with_original_env do
97+
ENV["BUNDLE_GEMFILE"] = "Gemfile"
9798
sh *command_opts unless command_opts.empty?
9899
yield if block_given?
99100
end
@@ -182,12 +183,12 @@ namespace :no_active_record do
182183

183184
# Rails 4 cannot use a `rails` binstub generated by Bundler
184185
sh "rm -f #{bindir}/rails"
185-
sh "bundle exec rails new #{example_app_dir} --skip-active-record --skip-javascript --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
186+
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
186187

187188
in_example_app(:app_dir => example_app_dir) do
188189
sh "./travis_retry_bundle_install.sh 2>&1"
189190
# Rails 4 cannot use a `rails` binstub generated by Bundler
190-
sh "bundle binstubs rspec-core rake --force"
191+
sh "bundle binstubs bundler rspec-core rake --force"
191192
sh "bundle binstubs railties" unless File.exist?("bin/rails")
192193

193194
application_file = File.read("config/application.rb")

0 commit comments

Comments
 (0)