symlink() NotImplementedError rabl

symlink() NotImplementedError rabl

添加到 gemfile 失败,因此我尝试了 gem install rabl。它失败并显示以下错误消息,看起来像它的 OS 具体...我在 Windows 7 上使用 Ruby 2.2 在 Rails 5 api

G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:388:in `symlink': symlink() function is unimplemented on this machine (NotImplementedError)
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:388:in `block (2 levels) in extract_tar_gz'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package/tar_reader.rb:65:in `each'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:365:in `block in extract_tar_gz'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:459:in `block in open_tar_gz'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:456:in `wrap'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:456:in `open_tar_gz'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:364:in `extract_tar_gz'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:345:in `block (2 levels) in extract_files'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package/tar_reader.rb:65:in `each'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:342:in `block in extract_files'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package/file_source.rb:30:in `open'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package/file_source.rb:30:in `with_read_io'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/package.rb:339:in `extract_files'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/installer.rb:772:in `extract_files'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/installer.rb:302:in `install'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/resolver/specification.rb:97:in `install'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:166:in `block in install'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:156:in `each'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/request_set.rb:156:in `install'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/commands/install_command.rb:205:in `install_gem'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/commands/install_command.rb:255:in `block in install_gems'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/commands/install_command.rb:251:in `each'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/commands/install_command.rb:251:in `install_gems'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/commands/install_command.rb:158:in `execute'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/command.rb:310:in `invoke_with_build_args'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/command_manager.rb:169:in `process_args'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/command_manager.rb:139:in `run'
        from G:/Ruby/ruby/lib/ruby/site_ruby/2.2.0/rubygems/gem_runner.rb:55:in `run'
        from G:/Ruby/ruby/bin/gem:21:in `<main>'

编辑: 经过大量谷歌搜索,找到了这个 here

Attempting to use the deploy resource on Windows fails with: symlink() function is unimplemented on this machine (NotImplementedError) This is because Ruby's underlying File.symlink() method does not support Windows.

In the short-term this should be mentioned in the docs. Longer term I think this could be fixed in the same way that the "link" directive works. This method may not work for soft links due to limitations with NTFS.

所以,它肯定是 Windows 特定的,但想知道为什么没有其他 post 或 link 解释它与 Windows 不兼容。 这不是可以在 Windows 中修复 吗?

这是有争议的,但有人说符号链接已在 Ruby 2.3 上实现。我会先尝试安装它。