Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle install not detecting git #4323

Closed
micdahl opened this issue Feb 26, 2016 · 7 comments
Closed

bundle install not detecting git #4323

micdahl opened this issue Feb 26, 2016 · 7 comments

Comments

@micdahl
Copy link

micdahl commented Feb 26, 2016

On Windows 10, 64bit. When trying to install a gem via git I get the error documented below. git is installed and in path.

Part of gemfile:
gem 'activeadmin', github: 'activeadmin'

console output:


   C:\Users\user\rails_project>path
   PATH=C:\Entwicklung\Ruby22\bin;"C:\Entwicklung\PortableGit\cmd";

   C:\Users\user\rails_project>git version
   git version 2.7.2.windows.1

   C:\Users\user\rails_project>bundle install
   ...
   Errno::ENOENT No such file or directory - git clone ...
   Environment

    Bundler   1.11.2
    Rubygems  2.4.5.1
    Ruby      2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
    GEM_HOME  C:/Entwicklung/Ruby22/lib/ruby/gems/2.2.0
    GEM_PATH  C:/Entwicklung/Ruby22/lib/ruby/gems/2.2.0;C:/Users/user/.gem/ruby/2.2.0
    Git       not installed

@segiddins
Copy link
Member

In a directory with an empty file, can you try doing bundle exec path, bundle exec git version, bundle exec which git and share the output thereof? Thanks!

@micdahl
Copy link
Author

micdahl commented Feb 26, 2016

Don't know what you mean with "directory with an empty file", but created a new rails project and did the commands there:

C:\Users\michael\empty>bundle exec path
PATH=C:/Entwicklung/Ruby22/lib/ruby/gems/2.2.0/bin;C:\Entwicklung\Ruby22\bin;"C:\Entwicklung\PortableGit\cmd"

C:\Users\michael\empty>bundle exec git version
bundler: command not found: git
Install missing gem executables with `bundle install`

C:\Users\michael\empty>bundle exec which git
bundler: command not found: which
Install missing gem executables with `bundle install`

@micdahl
Copy link
Author

micdahl commented Feb 26, 2016

Removed the quotation marks from git path and now it is running:

C:\Users\michael\empty>bundle exec path
PATH=C:/Entwicklung/Ruby22/lib/ruby/gems/2.2.0/bin;C:\Entwicklung\Ruby22\bin;C:\Entwicklung\PortableGit\cmd

C:\Users\michael\empty>bundle exec git version
git version 2.7.2.windows.1

@segiddins
Copy link
Member

Sorry, meant empty Gemfile. and yeah, I'm guessing the quotes were the issue

@indirect indirect reopened this Feb 27, 2016
@indirect
Copy link
Member

Sounds like this is a real bug, and we need to account for quoted entries in PATH inside Bundler.which?

@segiddins
Copy link
Member

As far as I knew, quoting entries Wasn't allowed?

@indirect
Copy link
Member

Quotation marks may not be allowed on UNIX, but they are absolutely allowed on Windows: https://blogs.msdn.microsoft.com/oldnewthing/20060929-06/?p=29533

@homu homu closed this as completed in #4326 Mar 1, 2016
homu added a commit that referenced this issue Mar 1, 2016
Handle quotes in PATH

Fixes #4323 and adds tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants