Install results in LoadError
atstockland opened this issue · 10 comments
I followed the readme to install the gem, but am running into an issue.
Rails: 6.0.3.4
Ruby 2.7.2
MacOS 11.0.1
iterm2 3.4.2
zsh
gem install irbtools
added gem 'irbtools', require: 'irbtools/binding' to gem file
added require 'irbtools' to .irbrc
Then, I attempt to boot up the console using "bin/rails console"...which results in the following error:
/Users/xxxx/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- irbtools/binding (LoadError)
Is there an issue with the gem or did I miss something in the install? Thanks!!
@atstockland
For me irbtools loaded successfully without the last step "added require 'irbtools' to .irbrc".
However, in the console I now can't perform any simple variable assignment operation:
Loading development environment (Rails 6.0.0)
Welcome to RAILS. You are using ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin19]. Have fun ;)
>> string = 'hello there'
Traceback (most recent call last):
ArgumentError (wrong number of arguments (given 1, expected 0))
Assignment works fin in irb, but not in the rails console.
Try calling "string"....it may have been assigned even though you got that error. Do you have Hirb installed? That's the exact error I was getting and I traced it back to Hirb. Hirb has been inactive for some time...hence the desire to get Irbtools installed.
Try calling "string"....it may have been assigned even though you got that error. Do you have Hirb installed? That's the exact error I was getting and I traced it back to Hirb. Hirb has been inactive for some time...hence the desire to get Irbtools installed.
Thanks @atstockland. You're right. It was assigned.
And I do have Hirb installed, but Hirb is also a dependency of irbtools. How did you get past this error?
I actually gave up. I'm still just using Hirb. I get the error every time I assign a var, but I know it was assigned. I hope I can update to irbtools or Hirb gets updated some day. For now I'm living with it.
Hi there, I'll take a look soon ;)
What would be helpful also, if you could post your irb version (irb --version
from CLI or IRB::VERSION
from IRB itself).
Hi Jan. irb 1.2.6 (2020-09-14).
Hi @janlelis, my version is irb 1.2.8 (2020-12-20)
@janlelis in case it helps, I also fully removed irbtools, installed hirb, launched irb, enabled hirb and experienced the same issue.
There is a fork named hirber and I also see that you raised an issue over there recently. Are you considering replacing the hirb dependency in irbtools? Thanks
hirber works fine for me.
I have just released 3.0.3, which should fix the issue, could you try if it is fixed for you all?
hirber looks great! If it continues to be maintained better than hirb (or even developed further), I will totally replace hirb with hirber.
@janlelis thanks. I have been using 3.0.3 all day without issue. Thank you for the quick response and resolution! Awesome.