【发布时间】:2020-11-24 18:59:45
【问题描述】:
我有一个相对较大的结构化数据语料库,我需要对其进行验证。我计划使用来自这个 repo https://github.com/structured-data/linter 的 Ruby Structured Data Linter 来自动化验证。在我尝试运行时克隆了 repo 并安装了所有必需的包后
rake schema:examples
我收到一个错误
C:\Users\anast\Projects\Schema\linter>rake schema:examples
rake aborted!
LoadError: cannot load such file -- rdf/linter
C:/Users/anast/Projects/Schema/linter/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
我该如何解决这个问题?值得一提的是,我已经尝试将 lib 文件夹添加到 PATH。
C:\Users\anast\Projects\Schema\linter>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.1.4
- RUBY VERSION: 2.7.1 (2020-03-31 patchlevel 83) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby27/lib/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: C:/Users/anast/.gem/ruby/2.7.0
- RUBY EXECUTABLE: C:/Ruby27/bin/ruby.exe
- GIT EXECUTABLE: C:\Program Files\Git\cmd/git.EXE
- EXECUTABLE DIRECTORY: C:/Ruby27/bin
- SPEC CACHE DIRECTORY: C:/Users/anast/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby27/lib/ruby/gems/2.7.0
- C:/Users/anast/.gem/ruby/2.7.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\Windows\System32\WindowsPowerShell\v1.0\
- C:\Windows\System32\OpenSSH\
- "C:\MinGW\bin
- C:\MinGW\msys\1.0\bin"
- C:\Users\anast\AppData\Local\Programs\Python\Python38
- C:\Program Files\Git\cmd
- C:\Program Files (x86)\swigwin-4.0.2
- C:\Program Files\nodejs\
- C:\Users\anast\Projects\Schema\linter\lib
- C:\Ruby27\bin
- C:\Ruby26\bin
- C:\Users\anast\AppData\Local\Microsoft\WindowsApps
-
- C:\Program Files\JetBrains\PyCharm 2020.1.4\bin
-
- C:\Users\anast\AppData\Local\Programs\Microsoft VS Code\bin
- C:\Users\anast\AppData\Roaming\npm
我完全没有使用 ruby 的经验,因此将不胜感激:)
【问题讨论】:
-
你运行
rake schema:examples了吗?您还可以在您的问题中添加gem env的输出吗? -
是的,我尝试运行此命令,我在问题中添加了更详细的输出和
gem env
标签: ruby rake structured-data linter