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

Bundler on Windows with space in HOME directory not working #196

Closed
dsisnero opened this issue Mar 15, 2010 · 4 comments
Closed

Bundler on Windows with space in HOME directory not working #196

dsisnero opened this issue Mar 15, 2010 · 4 comments

Comments

@dsisnero
Copy link
Contributor

On windows with my HOME directory set as c:\Documents and Settings\Dominic E Sisneros\My Documents\

after running
rails dm_rails3_app -m http://github.com/snusnu/rails-templates/raw/master/dm_rails_master.rb

from directory c:\programming\rails
I get the following as part of the stacktrace:

fatal: 'C:/Documents' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
c:/tools/ruby-1.8.7-p249-i386-mingw32/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/source.rb:327:in `chdir': No such file or directory - C:/Documents
and Settings/Dominic E Sisneros/My Documents/.bundle/ruby/1.8/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master (Errno::ENOENT)

@indirect
Copy link
Member

Thanks for reporting this. It is fixed on master, and will be in the next release.

@arthwood
Copy link

This fix should be applied in more places than "checkout":

http://github.com/carlhuda/bundler/commit/d2c92e4a16f9da039e57bca35e3ab75d97b69062

I'm still getting this error since "cache" method clones the repo into the project's directory (source.rb:322)
This is more general issue related to paths that contain spaces. All those should be wrapped around the quotes, e.g. source.rb:327:

unless File.exist?(%Q("#{path}/.git"))

which is not very readable but some path getter would do the job

@indirect
Copy link
Member

Good point. I quoted the rest of the paths in aa40749, and added a spec. Should be good now.

@arthwood
Copy link

single quotes didn't work for me. In version 0.9.12 I changed following lines in source.rb:

319: in_cache { git %Q{fetch --quiet "#{uri}" master:master} }
323: git %Q{clone "#{uri}" "#{cache_path}" --bare --no-hardlinks}
329: git %Q{clone --no-checkout "#{cache_path}" "#{path}"}

and then it went smoothly.

joevandyk pushed a commit to joevandyk/bundler that referenced this issue May 16, 2011
joevandyk pushed a commit to joevandyk/bundler that referenced this issue May 16, 2011
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants