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

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

Open
DominikAlberski opened this issue Mar 30, 2021 · 4 comments
Open

Comments

@DominikAlberski
Copy link

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
Copy link

akhatem commented Apr 23, 2021

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
Copy link

stwr667 commented Jul 11, 2021

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
Copy link

Meryldominguez commented Mar 8, 2022

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
Copy link

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.

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

5 participants