Bundle command not found. Bad Interpreter
The error you're seeing indicates that the logic inside the script is looking for another item under C:\Program Files... and, for some reason, whatever it's looking for was not surrounded by quotes.
So, it thinks each piece of that path that's separated by a space is a separate argument. My guess is that it's trying to run 'ruby' from the appropriate PATH variable, so:
C:\Program Files (x86)\ruby-1.9.3\bin\ruby
which is interpreted as you calling
C:\Program
with the arguments "Files" and "(x86)\ruby-1.9.3\bin\ruby". You can see why that wouldn't work ;-)
I don't know enough about your environment to tell you how to fix it, but if you are adding these things to your PATH manually then you should surround each one in quotes, in which case:
C:\Program Files (x86)\ruby-1.9.3\bin;
would become:
"C:\Program Files (x86)\ruby-1.9.3\bin";
Bundle command not found Windows x64
Well I found the solution, so I'm posting here.
Problem seems to be the bunlder installation in windows x64 machines, to solve this I did this.
Copy the following directories to C:/
C:\Program Files (x86)\Heroku
C:\Program Files (x86)\Git
C:\Program Files (x86)\ruby-1.9.2
Change windows environment "Path" variable, to do this right click Computer > Properties > Advance Settings > environment variables. Path is under "System Variables" section. Edit them to this:
C:\Heroku\bin;C:\ruby-1.9.2\bin;C:\git\bin;C:\git\cmd
Go to C:\ruby-1.9.2\bin and open the "bunlde" file with note pad (not the bundle.bat), change the first line from #!"c:/Program Files (x86)/ruby-1.9.2/bin/ruby.exe"##
to !#!c:/ruby-1.9.2/bin/ruby.exe##
Now go to C:\Git and change the properties (right click > properties) of the Git Bash direct access, and change the target from C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"
to C:\Windows\SysWOW64\cmd.exe /c ""C:\Git\bin\sh.exe" --login -i"
Hope it helps someone
Rails bundle - bad interpreter
You should run:
gem install bundler
after reinstalling ruby and point of note, your version of ruby should be same as that in the Gemfile
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.
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.
Related Topics
Set Attribute Dynamically of Ruby Object
Why Does Array.Slice Behave Differently for (Length, N)
Is There an Expect Equivalent Gem for Ruby
Prevent Rails Test from Deleting Seed Data
Installing Jekyll on Ubuntu 14.04
Is It Possible for Rspec to Expect Change in Two Tables
How to Prevent Nokogiri from Adding <Doctype> Tags
Dynamically Set Local Variables in Ruby
Change the Binding of a Proc in Ruby
How to Debug in Rubymine 4.5 Using Ruby 1.9.3
Using Ruby Convert Numbers to Words
Project Euler 1:Find the Sum of All the Multiples of 3 or 5 Below 1000
Errno::Econnrefused: Connection Refused - Connect(2) for Action Mailer
Is There a Built-In Binary-Search in Ruby
Typing 'Rails Console' Doesn't Start
Irb History Not Working with Ruby 2.3.0