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

require stringio before use #1062

Merged
merged 1 commit into from
May 3, 2023

Conversation

wizardofelves
Copy link
Contributor

Hello!

I upgraded to Ruby 3.1, and when I did i started receiving errors that uninitialized constant StringIO (NameError). I feel this is similar to the PR for require delegate that had been addressed earlier.

https://github.com/mileszs/wicked_pdf/pull/1019/files

When running WickedPDF via the ruby command using ruby 3.1, I received

/usr/local/rvm/rubies/ruby-3.1.3/lib/ruby/3.1.0/delegate.rb:61:in `const_get': uninitialized constant StringIO (NameError)

when running the following command

"bundle exec ruby -e 'require \"wicked_pdf\"; WickedPdf.new.pdf_from_string(\"<p>Ya did it</p>\"); puts \"great!"'"

In all examples I've seen this used, we should first require this.

https://ruby-doc.org/stdlib-2.5.1/libdoc/stringio/rdoc/StringIO.html

Thank you

@unixmonkey unixmonkey merged commit 4abf255 into mileszs:master May 3, 2023
@unixmonkey
Copy link
Collaborator

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants