Reputation: 331
I removed the previous version of ruby I installed, ruby 1.9.1 to be precise, on my Ubuntu, and installed version 2.2.3. When I try to run bundle install on my terminal, I get this error
bash: /usr/local/bin/bundle: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory.
Can anyone advice on how to fix it?
Upvotes: 0
Views: 662
Reputation: 11890
How did you remove the old version of Ruby?
It looks like it left the binary executable for bundler
, so I'm guessing you just straight up deleted the usr/bin/ruby
folder? Ruby installations (and most installations) tend to create executable binaries in other folders that need to be deleted as well.
I would highly recommend that you use something like rvm
or rbenv
to manage multiple versions of ruby on your system. Those tools are designed to do that sort of thing and are basically industry standard at this point.
My personal recommendation is rvm
, although either is really fine. If you choose to go with that, check out rvm.io for installation instructions.
It'll install rvm
with the latest ruby version. In addition to that you are free to install any other version of ruby or patch that you prefer, and you can easily switch between the two using rvm use <ruby version>
Upvotes: 0