awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

ArgumentError (wrong number of arguments (given 1, expected 0)) #412

Open DominikAlberski opened 3 years ago

DominikAlberski commented 3 years ago

After adding AwesomePrint.irb! to .irbrc I got that error on every variable assignment inside rails console:

f = 0
Traceback (most recent call last):
ArgumentError (wrong number of arguments (given 1, expected 0))

I've also added proper line to .pryrc but when switched to pry I got the same error as in #404

akhatem commented 3 years ago

I had the same issue and after searching I found this: in your ~/.irbrc file add the following lines.. require 'awesome_print' AwesomePrint.irb!

and don't forget to do one of the following: 1- gem install awesome_print 2- add gem 'awesome_print' in the project's Gemfile as per the Installation guide

Doing what I mentioned solved this issue for me at least. I hope it does for your too.

stwr667 commented 3 years ago

Adding AwesomePrint.irb! to ~/.irbrc fixed this issue for me, although it had to be near the end of the file due to an IRB::Irb.class_eval I had in there which relied on being executed first.

Meryldominguez commented 2 years ago

Hey all! I have the gem installed in my gemfile, and the two lines in ~/.irbrc but im still getting this error when assigning to a variable. any advice?

dportalesr commented 1 year ago

I had to patch the gem locally. This fixed it https://github.com/awesome-print/awesome_print/pull/390/files I'm migrating to amazing_print later.