gem which cannot find gem despite it being installed

后端 未结 3 1256
陌清茗
陌清茗 2021-01-12 10:20

I\'ve built my first gem but I don\'t seem to be able to get it to install correctly. I can issue the command

sudo gem install ceilingfish-toto
3条回答
  •  不思量自难忘°
    2021-01-12 10:38

    gem which ceilingfish-toto looks through the gem require path for a file named ceilingfish-toto.rb. Since there isn't one, it returns nothing. What would work for you is gem which toto, but since lib/ is not included in your gem spec, the lib files are not installed, so it doesn't exist.

    Rerunning rake gemspec might fix the problem.

    As an aside, you can check whether a gem is installed by its name by using gem list ceilingfish-toto which should show you it is installed, regardless of the files it has(it will also list the versions installed).

提交回复
热议问题