Dark star
Dark star

Reputation: 5862

bundle install error no such file or directory

When i try install gem in rails app show my this error :

-bash: /usr/local/bin/bundle: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory

Any idea as to why this is happening and how to fixed?

Thanks.

Upvotes: 0

Views: 3935

Answers (1)

Philip
Philip

Reputation: 11

For me it was my path setting, as revealed by rvm

rvm list

output:

Warning! PATH is not properly set up, '/Users/user/.rvm/gems/ruby-2.2.6/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.2.6'.

rvm rubies

=* ruby-2.2.6 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Before checking my PATH, I ran the suggested command:

rvm use ruby-2.2.6

After that, the bundle command worked just fine. I then located where my PATH had got corrupted, and fixed that.

Upvotes: 1

Related Questions