Roo 的错误。任何用于解析 .ods 文件的 gem
我正在尝试使用 roo gem 来解析 Openoffice 电子表格。 时收到以下错误
但是,我在启动 localhost /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo/openoffice.rb:3:in `require ': 没有这样的文件可以加载 -- zip/zipfilesystem (LoadError
) /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo/openoffice.rb:3:in `'
来自 /home/raison/.rvm/gems/ ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo.rb:68:在`require'
中/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo.rb:68:in `'
来自 /home/raison/.rvm/gems/ruby- 1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:在“require”
中 块(2 级)”中
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:在“require中的 “每个”
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:66 :来自 /home/raison/.rvm/gems 的 /ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in 的`block in require'
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
中 “require”
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:55 :来自 /home/raison/.rvm/gems 的 /ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
来自 /home/raison/anna/config/application.rb:7:7:in
来自 /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib 的 /rails/commands.rb:28:在`require'
中 “块”中
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:28:在来自 /home/raison/.rvm/ 的 gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:27:in “tap”
来自 /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:27:in
来自 script/rails:6 的 `require' 中
:在script/rails:6 的
:在 `' 中我已经安装了 rubyzip。有人可以帮我吗?另请建议一些用于解析 .ods 文件的替代 gem。
I am trying to use the roo gem to parse an Openoffice spreadsheet. However I am getting the following error while beginning my localhost
/home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo/openoffice.rb:3:in `require': no such file to load -- zip/zipfilesystem (LoadError)
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo/openoffice.rb:3:in `'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo.rb:68:in `require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/roo-1.9.3/lib/roo.rb:68:in `'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `block in require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
from /home/raison/anna/config/application.rb:7:in `'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:28:in `require'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:28:in `block in '
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:27:in `tap'
from /home/raison/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/commands.rb:27:in `'
from script/rails:6:in `require'
from script/rails:6:in `'
I already have rubyzip installed. Can anyone help me out here? Also please suggest some alternate gems for parsing .ods files .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Gemfile
gem 'rubyzip' 中,:require => 'zip/zip 文件系统'
In Gemfile
gem 'rubyzip', :require => 'zip/zipfilesystem'
Rspreadsheet 允许您读取、修改和写入 ods 文件。这是其基本用法的示例
该项目正在积极开发中,我在我的项目中使用它。欢迎任何评论。如果您要迁移某个功能,您可以填写请求,它将被实现。
Rspreadsheet allows you to read, modify and write ods files. Here is the example of its basic usage
The project is under active developments and I use it in my projects. Any comments are welcomed. If you are migging a feature, you may fill in the request and it will be implemented.