Skip to content

Commit 08f60eb

Browse files
committed
rake webpack: wrap execution in clean env.
This is needed, becasue the builder app has a separate Gemfile. https://stackoverflow.com/a/31150424/2066546 #343 (comment) #343 (comment)
1 parent cdc55b1 commit 08f60eb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Rakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,21 @@ namespace :webpack do
4040

4141
namespace :build do
4242
task :development => 'yarn:install' do
43-
sh "cd builder && bin/webpack"
43+
Bundler.with_clean_env do
44+
sh "cd builder && bin/webpack"
45+
end
4446
end
4547
task :production => 'yarn:install' do
46-
sh "cd builder && rake webpacker:compile"
48+
Bundler.with_clean_env do
49+
sh "cd builder && bin/rake webpacker:compile"
50+
end
4751
end
4852
end
4953

5054
task :watch => 'yarn:install' do
51-
sh "cd builder && bin/webpack --watch"
55+
Bundler.with_clean_env do
56+
sh "cd builder && bin/webpack --watch"
57+
end
5258
end
5359

5460
namespace :yarn do

0 commit comments

Comments
 (0)