ruby: bad interpreter: No such file or directory
FernandoMiguel opened this issue · 9 comments
$ terraforming r53r --tfstate
/usr/local/bin/terraforming: /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/terraforming: line 2: /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming: Undefined error: 0
ProductName: Mac OS X
ProductVersion: 10.15.1
BuildVersion: 19B68f
$ brew --version
Homebrew 2.1.14
Homebrew/homebrew-core (git revision 3592; last commit 2019-10-15)
Homebrew/homebrew-cask (git revision 6746e7; last commit 2019-10-15)
@chenrui333 not sure you can help here?
I have this issue as well:
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A602
brew --version
Homebrew 2.2.0
Homebrew/homebrew-core (git revision bd9f90; last commit 2019-12-06)
Homebrew/homebrew-cask (git revision b10c3; last commit 2019-12-06)
$ terraforming s3
/usr/local/bin/terraforming: /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/terraforming: line 2: /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming: Undefined error: 0
NOTE: Editing /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming, changing first line from
#!/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
to #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
solved the issue in the short term. However, I suspect this would be overwritten when an upgrade is performed.
Sure, I can take a look.
I have just done the fresh installation and run the terraforming r53r --tfstate
, it works well for me.
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
that looks like a familiar issue to me.
can you run brew reinstall terraforming
to see if it works?
this error might be due to the OS upgrade.
I just performed a brew remove terraforming
and then a subsequent brew install terraforming
and it is working.
When I look in /usr/local/Cellar/terraforming/0.18.0/libexec/bin/terraforming, I see that the first line points to the 2.6 version of ruby: #!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
. I suspect this might break at some point. Would it make sense to always point to "Current"?
The contents of the /System/Library/Frameworks/Ruby.framework/Versions/
dir is:
$ ls -al /System/Library/Frameworks/Ruby.framework/Versions/
total 0
drwxr-xr-x 4 root wheel 128 Oct 12 09:55 .
drwxr-xr-x 5 root wheel 160 Oct 12 09:55 ..
drwxr-xr-x 6 root wheel 192 Sep 29 16:29 2.6
lrwxr-xr-x 1 root wheel 3 Oct 12 09:52 Current -> 2.6
/System/Library/Frameworks/Ruby.framework/Versions/
that is MacOS default ruby installation though (ruby 2.6 on Catalina OS). I think for every MacOS upgrade, it (homebrew stuff) might be broken.
I had the similar issue before and after remove ruby symlink (that is why I feel like I saw this earlier), it started working for me. :)
I have faced the similar issue due to ruby version not set. These are the steps that I have followed:
Check rbenv versions in your system by this command:
rbenv versions
if not then installed and set local or globally as per need by command:
rbenv local 2.6.6
the output of rbenv versions command like this-
* system (set by /Users/sakshijain/.rbenv/version)
2.3.7
2.4.0
2.5.0
2.6.3
2.6.5
2.6.6