pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

Error installing v1.1.1 on Windows #174

Closed madhon closed 4 years ago

madhon commented 7 years ago

ruby 2.2.5p319 (2016-04-26 revision 54774) [i386-mingw32] RubyGem 2.6.8 Windows 10 Pro x64

''' Updating installed gems Updating pygments.rb Fetching: pygments.rb-1.1.1.gem (100%) C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:388:in symlink': symlink () function is unimplemented on this machine (NotImplementedError) from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:388:inbloc k (2 levels) in extract_tar_gz' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package/tar_reader.rb:6 5:in each' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:365:inbloc k in extract_tar_gz' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:459:in bloc k in open_tar_gz' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:456:inwrap ' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:456:in open _tar_gz' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:364:inextr act_tar_gz' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:345:in bloc k (2 levels) in extract_files' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package/tar_reader.rb:6 5:ineach' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:342:in bloc k in extract_files' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package/file_source.rb: 30:inopen' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package/file_source.rb: 30:in with_read_io' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:339:inextr act_files' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/installer.rb:772:in ex tract_files' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/installer.rb:302:inin stall' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/resolver/specification. rb:97:in install' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:166:in block in install' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:156:in each' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:156:in install' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/dependency_installer.rb :405:in install' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/commands/update_command .rb:213:inupdate_gem' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/commands/update_command .rb:225:in block in update_gems' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/commands/update_command .rb:224:ineach' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/commands/update_command .rb:224:in update_gems' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/commands/update_command .rb:100:inexecute' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/command.rb:310:in invo ke_with_build_args' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/command_manager.rb:169: inprocess_args' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/command_manager.rb:139: in run' from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/gem_runner.rb:55:inru n' from C:/Ruby22/bin/gem:21:in `

' '''

rschuetzler commented 7 years ago

Similarly, I receive the following error when trying to install on Windows.

Errno::EACCES: Permission denied @ rb_file_s_symlink -
(vendor/pygments-main/scripts/debug_lexer.py,
C:/Ruby23/lib/ruby/gems/2.3.0/gems/pygments.rb-1.1.1/vendor/pygments-main/scripts/find_error.py)
An error occurred while installing pygments.rb (1.1.1), and Bundler cannot
continue.
Make sure that `gem install pygments.rb -v '1.1.1'` succeeds before bundling.
miltador commented 7 years ago

Same with 1.1.2. find_error.py was supposed to be excluded as it is a symlink and @mojavelinux (#177) fixed it. I tested his fix manually under Linux and it worked. Maybe author used another OS (MacOS e.g.) where that find ... command doesn't work? Anyway vendor/pygments-main/scripts/find_error.py wasn't supposed to be in resulting gem.

cc @tmm1, @gfx

gfx commented 7 years ago

Can you try v1.2.0? It excludes symlinks without using find(1).

miltador commented 7 years ago

1.2.0 installed successfully on Windows. Thanks for the fix!

slonopotamus commented 4 years ago

I believe, this issue should be closed as fixed.