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

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



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?).


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


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