Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix another bug with ensure_rbenv_ruby

Backticks are evaluated with sh and may not have the rbenv bin path
loaded. So, check `which ruby` by using a bash login shell.
  • Loading branch information...
commit ce1118f52b99e4b585dcb39ca1913eed8a969412 1 parent b9d4ddd
@cespare cespare authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/terraform/dsl.rb
2  lib/terraform/dsl.rb
@@ -133,7 +133,7 @@ def ensure_rbenv_ruby(ruby_version)
ensure_packages "curl", "build-essential", "libxslt1-dev", "libxml2-dev", "libssl-dev"
dep "rbenv ruby: #{ruby_version}" do
- met? { `which ruby`.include?("rbenv") && `rbenv versions`.include?(ruby_version) }
+ met? { `bash -lc 'which ruby'`.include?("rbenv") && `rbenv versions`.include?(ruby_version) }
meet do
puts "Compiling Ruby will take a few minutes."
shell "rbenv install #{ruby_version}"
Please sign in to comment.
Something went wrong with that request. Please try again.