bundler icon indicating copy to clipboard operation
bundler copied to clipboard

symlink on windows not available

Open dsisnero opened this issue 16 years ago • 3 comments

Downloading rack-test-0.5.3.gem Downloading rake-0.8.7.gem Downloading sqlite3-ruby-1.2.5.gem Installing abstract (1.0.0) C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:170:in symlink': symlink() function is unimplemented on this mac hine (NotImplementedError) from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:170:inexpand_vendored_gem' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:121:in block in do_install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:111:ineach' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:111:in do_install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:44:ininstall' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/environment.rb:60:in install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:39:inbundle' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:65:in run' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:6:inrun' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/commands/bundle_command.rb:68:in execute' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command.rb:257:ininvoke' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:132:in process_args' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:102:inrun' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/gem_runner.rb:58:in run' from C:/Ruby19/bin/gem:21:in

'

dsisnero avatar Dec 15 '09 08:12 dsisnero

def expand_vendored_gem(spec, options)
  add_spec(spec)
  FileUtils.mkdir_p(@path.join("gems"))
  if RUBY_PLATFORM.downcase =~ /[mswin|mingw]32/ 
    require 'rubygems'
    require 'win32/dir'
    Dir.create_junction(@path.join("gems", spec.full_name).to_s, spec.location.to_s)
  else
    File.symlink(spec.location, @path.join("gems", spec.full_name))
  end
end

joystick avatar Dec 16 '09 17:12 joystick

Dir.create_junction looks interesting but fails on Ruby 1.9.1 so I was unable to test it.

MattHulse avatar Jan 01 '10 08:01 MattHulse

also win32/dir comes with native extensions. so it doesn't work with jruby.

rubiii avatar Jan 18 '10 14:01 rubiii