红宝石。 Releasy。制作exe文件

时间:2015-07-25 15:10:04

标签: ruby compilation exe

我想与朋友分享我的ruby应用程序,所以我决定制作.exe文件,因为我不希望他们安装Ruby并手动运行我的代码。我尝试在GitHub上使用他们的例子中的rake文件。当我运行rake build:windows:wrapper时,我看到了这个痕迹:

$ rake build:windows:wrapper --trace
rake aborted!
LoadError: cannot load such file -- releasy
/home/edward/.rvm/rubies/ruby-2.0.0-p645/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/edward/.rvm/rubies/ruby-2.0.0-p645/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/edward/RubyProjects/SG/Rakefile:3:in `<top (required)>'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/bin/rake:23:in `load'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/bin/rake:23:in `<main>'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/bin/ruby_executable_hooks:15:in `eval'
/home/edward/.rvm/gems/ruby-2.0.0-p645@rails_4_0/bin/ruby_executable_hooks:15:in `<main>'

我该怎么办?也许我应该为此目的使用另一颗宝石?由于很多奇怪的错误,Ocra并没有为我工作。 Ubuntu 14.04。谢谢!

1 个答案:

答案 0 :(得分:0)

显然releasy未安装,或未安装在您的路径中。

您应该阅读错误消息,并按照建议行事,在这种情况下,请安装或者在您的路径中使用它。

由于您使用的是rvm,因此可以在不使用sudo的情况下执行gem install releasy来安装gem。如果您使用了sudo,那么这就解释了为什么它不在您的路径中,因为您没有使用系统Ruby。