janlelis / irbtools

Improvements for Ruby's IRB console 💎︎
MIT License
920 stars 27 forks source link

cannot load such file -- irbtools #54

Closed jedrekdomanski closed 1 year ago

jedrekdomanski commented 1 year ago
ruby -v
#=> ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]

gem install irbtools
gem info irbtools
*** LOCAL GEMS ***

irbtools (3.0.5)
    Author: Jan Lelis
    Homepage: https://irb.tools
    License: MIT
    Installed at: /Users/jedrek/.rvm/gems/ruby-2.7.4

    Irbtools happy IRB.

echo 'require "irbtools"' >> ~/.irbrc
irb
cannot load such file -- irbtools

Inside irb

require 'irbtools'
Traceback (most recent call last):
       16: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/exe/bundle:49:in `block in <top (required)>'
       15: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli.rb:25:in `start'
       14: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
       13: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli.rb:31:in `dispatch'
       12: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
       11: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
       10: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        9: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli.rb:479:in `exec'
        8: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli/exec.rb:23:in `run'
        7: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli/exec.rb:58:in `kernel_load'
        6: from /Users/jedrek/.rvm/gems/ruby-2.7.4/gems/bundler-2.2.33/lib/bundler/cli/exec.rb:58:in `load'
        5: from /Users/jedrek/.rvm/rubies/ruby-2.7.4/bin/irb:23:in `<top (required)>'
        4: from /Users/jedrek/.rvm/rubies/ruby-2.7.4/bin/irb:23:in `load'
        3: from /Users/jedrek/.rvm/rubies/ruby-2.7.4/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
        2: from (irb):1
        1: from (irb):1:in `require'
ls /Users/jedrek/.rvm/gems/ruby-2.7.4/gems | grep irbtools
irbtools-3.0.5
janlelis commented 1 year ago

Hi there, are you using IRB from within a project with a Gemfile? Try adding gem "irbtools", require: "irbtools/binding" or use debundle.rb

jedrekdomanski commented 1 year ago

Hi there, are you using IRB from within a project with a Gemfile? Try adding gem "irbtools", require: "irbtools/binding" or use debundle.rb

Yes, you were right. Outside project with Gemfile it works fine. Thanks.