【发布时间】:2014-02-10 00:13:01
【问题描述】:
我想尝试 MassTransit,但我遇到了第一个障碍。
首先downloads link 确实出现在正确的位置。所以我决定我只是获取源代码并构建它。然而,对 Ruby 和几个 gem 有依赖(对以前从未使用过 Ruby 的 c# 开发人员有点恼火),我安装了 Ruby 和 gems 并尝试运行 build.bat,现在我得到了....
Building for .NET 3.5
rake aborted!
cannot load such file -- zip/zip
C:/dev/MassTransit/rakefile.rb:7:in `<top (required)>'
(See full trace by running task with --trace)
所以我用 --trace 重新运行它,我得到...
Building for .NET 3.5
rake aborted!
cannot load such file -- zip/zip
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore/unzip.rb:2:in `<top (required)>'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore.rb:9:in `block in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore.rb:9:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore.rb:9:in `<top (required)>'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
C:/dev/MassTransit/rakefile.rb:7:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'
不幸的是,我一点也不聪明……有什么想法吗?
【问题讨论】:
-
是否有一个名为
zip的文件夹,并且在该文件夹中是否有一个名为zip.rb的文件?在 rakefile.rb 中,您可能需要将require更改为require_relative。问题也可能在这个文件中:C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore/unzip.rb -
@Rots 感谢您的评论...我有没有提到我有 0 次红宝石经验?没有 zip 文件夹。当您说我可能需要 require_relative 时,您的意思是将所有要求更改为 require_relative 吗?当您说问题可能出在 <..longpath..>/unzip.rb 文件中时,嗯,好吧...什么问题?
-
对不起,蒂姆,我应该更清楚地告诉你。
cannot load such file -- zip/zip行表示它正在某处的zip文件夹下寻找名为zip.rb的文件。它可以在C:/dev/MassTransit/或任何gem 文件夹中,例如对于长鳍金枪鱼gem 是C:/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.5/lib/albacore。 rakefile.rb 或任何一个 gem(可能是 albacore)都在寻找这个 zip 要求。也许检查 albacore unzip.rb 作为第一次检查,寻找需求。它会在文件的顶部,看起来像这样require zip/zip -
好的,所以当我在尝试的时候,我突然想到也许 zip 是我需要安装的另一个 gem,而且这似乎工作......然后我遇到了下一个错误,这次是是我需要安装的 semver(到目前为止,这种体验并不令人满意)现在构建,似乎拥有它需要的一切......但到下一个问题......现在我得到“未设置输出路径属性对于项目“MassTransit.csproj”
-
听起来像一个讨厌的安装过程!它是开源的吗?你可以修补它:) stackoverflow.com/questions/15134384/…
标签: c# ruby rake masstransit