Rbenv and Bundler: "Bad Interpreter: No Such File or Directory"

rbenv and bundler: bad interpreter: No such file or directory

The fact that gem is being executed by your /usr/local/bin means that rbenv isn't in your $PATH correctly.

Step 1:

Please delete any references you have of rbenv in the following areas:

  • ~/.profile
  • ~/.bashrc
  • ~/.bash_profile
  • ~/.gemrc

Step 2:

Reinstall rbenv using these instructions. It won't override, it will simply update changes to your ~/.bash_profile. Once reinstalled close your terminal and reopen. Everything should work correctly at that time.

Step 3:

Verify that everything was installed correctly by executing cat ~/.bash_profile. You should see the following. If you do, you're good to go.

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

Many cudos to @theTinMan for recently helping me sort through my rbenv installation.

Rails. 'Bundle install' gives the 'bad interpreter: No such file or directory' error after Ruby version upgrade (Windows)

Ok, I've found a solution.

First of all, do not use git bash terminal and use the cmd.exe instead. That gave me info on why bundle install doesn't work (something's wrong with 'mimemagic' gem).

I've run bundle update and it installed all necessary gems and now everything works fine.

problem with bundle

I think you need to export the path of ruby and bundle in your .bashrc (linux).

Open your .bashrc and add this line:

export PATH="$PATH:/usr/bin:/usr/local/bin/"

It should work.



Related Topics



Leave a reply



Submit