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

uninitialized constant Screencap::Phantom::CGI #8

Closed
davidpatters0n opened this issue Aug 5, 2014 · 3 comments
Closed

uninitialized constant Screencap::Phantom::CGI #8

davidpatters0n opened this issue Aug 5, 2014 · 3 comments

Comments

@davidpatters0n
Copy link

Following your documentation: https://github.com/maxwell/screencap#usage

1.9.3-p392 :001 > require 'screencap'
 => true 
1.9.3-p392 :002 > 
1.9.3-p392 :003 >     f = Screencap::Fetcher.new('http://google.com')
 => #<Screencap::Fetcher:0x0000000182d128 @url="http://google.com"> 
1.9.3-p392 :004 >   screenshot = f.fetch
NameError: uninitialized constant Screencap::Phantom::CGI
    from /home/david/.rvm/gems/ruby-1.9.3-p392/gems/screencap-0.1.1/lib/screencap/phantom.rb:7:in `rasterize'
    from /home/david/.rvm/gems/ruby-1.9.3-p392/gems/screencap-0.1.1/lib/screencap/fetcher.rb:24:in `raster'
    from /home/david/.rvm/gems/ruby-1.9.3-p392/gems/screencap-0.1.1/lib/screencap/fetcher.rb:9:in `fetch'
    from (irb):4

Any particular reason why?

@jamiew
Copy link
Collaborator

jamiew commented Aug 5, 2014

This will fix it for you:

require 'cgi'

Didn't think that was ever a default? So should have never worked

@davidpatters0n
Copy link
Author

@jamiew thank you for the quick response. That worked.

@jamiew
Copy link
Collaborator

jamiew commented Aug 5, 2014

submitted PR #9 to fix this globally

On Tue, Aug 5, 2014 at 9:16 AM, David Patterson [email protected]
wrote:

Closed #8 #8.

Reply to this email directly or view it on GitHub
#8 (comment).

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