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
How to "Nest" the Inclusion of Modules When Using the Ruby on Rails Activesupport::Concern Feature
Remove Element at Specific Index from Redis List
Carrierwave: Create 1 Uploader for Multiple Types of Files
Installing Pl/Ruby for Postgresql 8.3
Anything Speaking Against the Bitnami.Org Ruby/Rails/Redmine Stack
Converting External CSS to Inline CSS for Mail in Rails
What Do I Need to Do to Get Hash.From_Xml() to Work
Ruby on Rails: Two References with Different Name to the Same Model
Gem Install Dm-Postgres-Adapter Build Error
Using Each_With_Index with Map
Use Same Controller for Multiple Routes
How to Install and Use Slim Template Engine with Middleman
How to Get The Page Source with Mechanize/Nokogiri
Argument Out of Range Rails 4 and Bootstrap3-Datetimepicker-Rails
How to Properly Test Cancan Abilities with Rspec
Calling a Class Method Within a Class