Jagadish
Jagadish

Reputation: 392

/usr/bin/ruby: bad interpreter: No such file or directory

I am using capistrano for deployment of rails application. But while i am deploying my rails code into server i am getting following error.

The deploy has failed with an error: Exception while executing on host 00.00.00.00: bundle exit status: 126
bundle stdout: /home/rod/.rvm/scripts/set: /usr/local/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory
/home/rod/.rvm/scripts/set: line 19: /usr/local/bin/bundle: Success

How can i solve this issue?

Upvotes: 17

Views: 27326

Answers (2)

Raju Ram
Raju Ram

Reputation: 993

It's an issue related to ruby upgrade but bundle package path was old. To resolve it you should reinstall the bundler package again using gem.

Uninstall from system

sudo gem uninstall bundler

Install again

sudo gem install bundler

Upvotes: 22

Piyush
Piyush

Reputation: 119

After MacOSX High Sierra update got this issue. High Sierra updates ruby gem to version 2.3 but xcpreety command of Xcode 9 still using Ruby 2.0 which is unable to find now & gives bad interpreter. Just go to Terminal & run

sudo gem install xcpretty

insert your password it will update your xcpretty to ruby v2.3 & that will resolve the issue. Restart Xcode & do fresh clean build it works for me. Hope it helps!!!

Upvotes: 1

Related Questions