ib-ruby/ib-api

`require 'ib-api'` exits irb immediately

Closed this issue · 3 comments

I'm trying to test a bit of code to see if everything works, but when I attempt to run the code in irb I have it exit immediately

> irb
irb(main):001:0> require 'ib-api'
=> true
irb(main):002:0>

This is the only output I get, nothing else at all!
I'm currently running the master branch of the codebase.

Sorry I can't provide much more info than this, I'm not getting any feedback whatsoever. If it helps, my setup is as follows:

OS: OS X 11.5
Ruby: 2.5.3p105

Please use bin/console to experiment with ib-api.
The code is worth looking, too.
In the ib-example resp. you find a bunch of examples how to use the program.

btw. the behavior of irb is quite normal. You require a file and get a response, if the require was successful or not. A second

require 'ib-api'

should return «false» or nil, because the file is already required.

A last word: please use ruby 3.0 if possible.

How can I use bin/console when I'm including this in a different project? I haven't pulled this lib directly, it's a dependency. I'll have a look through it though and see if there's anything different there.

Sorry I just realised the code snippet I posted doesn't include the main terminal prompt after it. The issue I'm having is not it returning true - I know that's the normal behaviour for require. What's happening, is I'm immediately kicked out of rib and return to my main terminal

Screenshot 2021-08-15 at 08 20 58

I'm just installing ruby 3 now and will test if there's any change there

Appears to work just fine on ruby 3.0.2