Hello,
I wanted to try this gem and after installing, it is not found:
require 'finnhubrb'
. . .
3: from (irb):4
2: from (irb):5:in `rescue in irb_binding'
1: from (irb):5:in `require'
LoadError (cannot load such file -- finnhubrb)
This is in Ruby 2.7.0.
The reason seems to be that there is no top-level file defining the module, but instead all the files are directly in lib:
Whereas other modules such as hashie have a different structure:
ls ... hashie-4.1.0/lib
hashie hashie.rb
I then tried to load the files directly, which in itself works, but doesn't find the rest of the Gem:
require 'Client'
...
6: from (irb):5
5: from (irb):6:in `rescue in irb_binding'
4: from (irb):6:in `require'
3: from [path-to-gems]/finnhubrb-1.1.0/lib/Client.rb:1:in `<top (required)>'
2: from [path-to-gems]/finnhubrb-1.1.0/lib/Client.rb:2:in `<module:Finnhub>'
1: from [path-to-gems]/finnhubrb-1.1.0/lib/Client.rb:3:in `<class:Client>'
NameError (uninitialized constant Finnhub::Client::Calendar)
Hello, I wanted to try this gem and after installing, it is not found:
This is in Ruby 2.7.0.
The reason seems to be that there is no top-level file defining the module, but instead all the files are directly in
lib
:Whereas other modules such as hashie have a different structure:
I then tried to load the files directly, which in itself works, but doesn't find the rest of the Gem: