LoadError尽管gem安装和gemratgem文件 - LoadError despite gem install and gemrat addition to gem file

- 此内容更新于:2016-02-01
主题:

我在windows7。我不能添加/需要宝石。试图提取数据散列从excel电子表格。我得到同样的问题后使用data_mapper教程。在CMD,我在文件夹。这表明gem-filegem安装。如果我做的事:它在那里。崇高的文本中,我开始我的代码:但是如果我从CMD运行代码,它回来了:这可能是由于使用不同的版本,可能是可以解决的,区(显然认为这本身就是一种痛苦安装在Windows?)。

原文:

I'm on windows 7. I can't add/require gems. Trying to pull data into hashes from an excel spreadsheet. I get the same problem following a tutorial that uses data_mapper. In CMD, I'm in the folder in question.

gem install simple-spreadsheet
gemrat simple-spreadsheet

This shows the gem is installed in the gem-file. If I do:

gem list

it's in there. In Sublime Text, I start my code with:

require 'simple-spreadsheet'

but if I run the code from CMD, it comes back with:

cannot load such file: simple-spreadsheet

This may be due to using a different version, and may be fixable by RVM (thought this itself is apparently a pain to install on Windows?).

网友:如果你把它放到你的命令提示符:1)要求“简单的电子表格”;2)您想调用的代码

(原文:What happens if you put this in your command prompt: 1) require 'simple-spreadsheet'; 2) the code you want to call)

网友:假设你是说CMD(irb)?如果是这样,产生一个真正的。

(原文:Assume you mean CMD (irb)? If so, that generates a TRUE.)