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

Pty dependency failing on Windows 10 #819

Closed
RailsCod3rFuture opened this issue Mar 24, 2019 · 5 comments
Closed

Pty dependency failing on Windows 10 #819

RailsCod3rFuture opened this issue Mar 24, 2019 · 5 comments

Comments

@RailsCod3rFuture
Copy link

RailsCod3rFuture commented Mar 24, 2019

Issue description

When I install the gem, I receive the error below:

I know that this error is the result of a LINUX based script, and I cannot run it on Windows 10.

Error:[rake --tasks] rake aborted!
LoadError: cannot load such file -- pty
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wicked_pdf-1.2.1/lib/wicked_pdf/progress.rb:3:in `<module:Progress>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wicked_pdf-1.2.1/lib/wicked_pdf/progress.rb:2:in `<class:WickedPdf>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/wicked_pdf-1.2.1/lib/wicked_pdf/progress.rb:1:in `<top (required)>'

Expected or desired behavior

When I install the gem, it should successfully complete its rake tasks.

System specifications

wicked_pdf (1.2.1)
  wicked_pdf (~> 1.2, >= 1.2.1)

https://rubygems.org

platform/distribution and version (e.g. Windows 10/Heroku)

Is this dependency needed? Can it be removed.

@unixmonkey
Copy link
Collaborator

Yes, you should be able to opt out of using pty on windows systems.

I think we should add a guard around this line, and not require progress on windows, with a check similar to the one a few lines above it.

The Ruby 1.9 check shouldn't be necessary here, but /mswin|mingw/ is the important part. Both are valid values on Windows systems, depending on how Ruby is installed.

I'd love it if you could try this out yourself, since I don't have easy access to a Windows machine right now, and send a pull request or patch.

@RailsCod3rFuture
Copy link
Author

Thanks!

@unixmonkey
Copy link
Collaborator

I'm going to reopen this issue until either I see a related PR, or I get around to fixing it, since this is a newly-introduced issue from adding the progress feature.

@Lord-Fisch
Copy link

I created pull request #820 for this issue.
Verified working on Windows 10; Ruby 2.3.3; Rails 5.1.6.2

@unixmonkey
Copy link
Collaborator

Closing since this should be fixed in version 1.2.2 by the work in #820 .

Thank you @Lord-Fisch !

If for some reason this isn't helping, please let me know and I'll reopen.

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

3 participants