Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't load the irb library 'hirb' / 'ap': LoadError #21

Closed
florian opened this issue Oct 12, 2012 · 9 comments
Closed

Couldn't load the irb library 'hirb' / 'ap': LoadError #21

florian opened this issue Oct 12, 2012 · 9 comments

Comments

@florian
Copy link

florian commented Oct 12, 2012

So, today I was learning a bit more about bundler, and I tried bundle clean, thinking that it would show me the gems before removing them, and before I hit Ctrl+C to cancel, it removed a few gems.

Now, when I open irb, which requires irbtools:

$ irb                       
Welcome to IRB. You are using ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]. Have fun ;)
>> Couldn't load the irb library 'hirb': LoadError
* cannot load such file -- hirb
* /home/[user]/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'

Couldn't load the irb library 'ap': LoadError
* cannot load such file -- crack/xml
* /home/[user]/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

I reinstalled hirb and awesome_print, but the error still occurs.

$ gem list | grep hirb
hirb (0.7.0, 0.6.2, 0.5.0)

$ gem list | grep awesome_print
awesome_print (1.1.0, 1.0.2, 0.4.0)

I also tried reinstalling irbtools. Looks like I broke something. :/ I don't want to stop using irbtools, since I like it a lot. Can someone tell me what I could try to fix this?

@janlelis
Copy link
Owner

Hi js-coder, sorry for the late answer. Do you still experience these problems? Did you try to reinstall all hirb versions? Does irbtools work properly outside of bundled environments?

@florian
Copy link
Author

florian commented Oct 21, 2012

Do you still experience these problems?

Yep.

Did you try to reinstall all hirb versions?

I'm not sure, how would I do that?

Does irbtools work properly outside of bundled environments?

Nope, I get the exact same output when requiring irbtools.

@janlelis
Copy link
Owner

Did you try to reinstall all hirb versions?

I'm not sure, how would I do that?

When doing gem uninstall hirb, it'll ask you, if you want to remove all hirb versions.

On the other hand, does it work in a bundled environment (without the anti bundler hack in your irbrc)?

@florian
Copy link
Author

florian commented Oct 21, 2012

Yeah, I removed all hirb versions, but I didn't reinstall all of those, just the newest one. That sounds like it might be causing a problem, but how do I found out what versions I need?
I didn't write down which versions I removed.

On the other hand, does it work in a bundled environment (without the anti bundler hack in your irbrc)?

Sorry for all the questions, but what anti bundler hack?

@janlelis
Copy link
Owner

Sorry for not explaining: Since some weeks, the readme explains how to run irbtools in bundler environments without having to put it in the Gemfile (https://github.com/janlelis/irbtools/#rails-notes). I just want ensure that you are not using it to except it as a source for the problem.

Can please also you check if ruby -S gem list hirb outputs the same hirb versions as gem list hirb does?

@florian
Copy link
Author

florian commented Oct 22, 2012

Putting that hack into my ~/.irbrc didn't help, I don't get any error but it doesn't seem to load irbtools, $ irb just starts the plain old irb.

Can please also you check if ruby -S gem list hirb outputs the same hirb versions as gem list hirb does?

Yep, it does.

@janlelis
Copy link
Owner

OK, please remove the bundler hack from your ~/.irbrc again.

Which OS do you use? Are you using RVM to manage rubies? If so, dose the error also show up in another Ruby version?

@florian
Copy link
Author

florian commented Oct 25, 2012

Ubuntu 12.04, RVM and Ruby 1.9.3.

Since irbtools doesn't work on 1.8.7 I installed Ruby 1.9.2, so I didn't have any gems installed there and installed irbtools on 1.9.2. It works perfectly. :)
Do you have any idea how I could get it to work on 1.9.3 again though, other than removing all my gems?

@florian
Copy link
Author

florian commented Oct 27, 2012

Today I had a similiar problem with rspec and I've decided to remove all gems from 1.9.3 and reinstall again what I need. irbtools works perfectly now. :)

Thanks for your help and irbtools!

@florian florian closed this as completed Oct 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants