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

cannot load such file -- amazing_print (LoadError) #133

Open
vpereira opened this issue May 20, 2022 · 2 comments
Open

cannot load such file -- amazing_print (LoadError) #133

vpereira opened this issue May 20, 2022 · 2 comments

Comments

@vpereira
Copy link

vpereira commented May 20, 2022

Hi,

I'm updating my Ougai version from (1.8.2 to 1.8.5 or 2.0.0), I have Ougai in my Gemfile. Trying to load my application it breaks complaining that amazing_print isn't available. We added awesome_print to our Gemfile back in the days to make ougai work. Now we are adding amazing_print to solve the issue again.

My class looks like:

class FooReadable < Ougai::Formatters::Readable
 ...
 end

I see that in your gemspec you require amazing_print just in the test group.. isn't that a problem? Shouldn't it be loaded in all groups?

@tilfin
Copy link
Owner

tilfin commented May 20, 2022

When your application runs in the production environment, you expect the logs as JSON, so amazing_print is not necessary.
For example, in Rails, for applying readable logger to config.logger in development and test environments, amazing_print must be defined in their gem groups.

@vpereira
Copy link
Author

Hey @tilfin, thank you for your reply. Indeed my first try was to add the amazing_print just to the development, test groups and it worked for me, in development and test mode. I will investigate it further, thank you 👍

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