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
Why won't my Git Bash access bundle?
The $PATH
might have trouble interpreting "C:\Program Files (x86)\...
", as mentioned in "Bundle command not found. Bad Interpreter".
As illustrated in "Bundle command not found Windows x64", try installing anything ruby-related in a simpler path (no space, no special character).
Can’t run ”gem install bundle’ in git bash terminal
Make sure that:
- Ruby for Windows is installed
- your
%PATH%
is modified to referenceruby
(Advanced System Settings
/Environment Variables
/System Variables
/Path
: enter:C:\Path\to\Ruby\bin;
) rubygem
is installed. (If you userubyinstaller
, that should be already the case)
Then open a new CMD session, and type bash
(the bash from Git should open).
Then ruby
should be available, including gem
.
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 Install not working
The first line of bundle
command may be #! /c/Program Files/ruby-1.9.2/bin/ruby
. In this case, /c/Program
is treated as an interpreter. There is no way to escape spaces.
Try re-installing ruby to other directory that does not contain any spaces. (e.g. C:\ruby
)
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.
jruby/cucumber: Bundle install doesn't install any gem
You have the latest version of bundler 1.13.2 installed and I have seen it cause different types of issues depending on the jruby version and some other gems. Bundler 1.10.6 works everytime for my Jruby 1.7.x.
Try these:
gem uninstall bundler
and
gem install bundler -v 1.10.6
Related Topics
Can Activerecord Connect to Postgresql Remotely and Protect the Db Password
Rails Nested With_Option :If Used in Validation
Read Contents of a Local File into a Variable in Rails
Why Don't Ruby Methods Have Lexical Scope
How to Embed Ruby in JavaScript (Rails + .Html.Erb File)
Ruby on Rails: Conditionally Display a Partial
What Is the Purpose of a 'Transient Do' Block in Factorybot Factories
Rake Db:Migration Not Working on Travis-Ci Build
Raise Exception When Accessing Attributes That Doesn't Exist in Openstruct
How to Configure Config.Yml So That I Can Install Devkit
Single Occurrence Event with Ice_Cube Gem Using Start_Time and End_Time
How to Disable a Form Submit Button "A Là Ruby on Rails Way"
How to Fix Libv8 Error from Gemfile on Mavericks
Enumerator as an Infinite Generator in Ruby
Machinist VS Factorygirl - Pros and Cons
Accessing Nested Model Attributes Inside a Fields_For Without Using Formbuilder