I have a gem installed but require 'gemname' does not work. Why?

前端 未结 11 1799
傲寒
傲寒 2020-12-14 00:02

The question I\'m really asking is why require does not take the name of the gem. Also, In the case that it doesn\'t, what\'s the easiest way to find the secret incantation

11条回答
  •  既然无缘
    2020-12-14 00:23

    It could also be the gem name mismatch:

    e.g. dummy-spi-0.1.1/lib/spi.rb should be named dummy-spi-0.1.1/lib/dummy-spi.rb

    then you can

    require 'dummy-spi'
    

提交回复
热议问题