Forum: Ruby cannot load such file -- win32/screenshot (LoadError)

538199554d2b6280a73c639ea6c37762?d=identicon&s=25 Stan Vince (axiom139)
on 2017-02-24 16:35
While running the test in Ruby mine am seeing the following error
"cannot load such file -- win32/screenshot (LoadError)". HOwever, i see
gem 'win32ole-pp' is being commented. Cant find any resolution that
worked so far? can someone help please?
0fa73332c8e4a3b06ea439fd3f034322?d=identicon&s=25 Ronald Fischer (rovf)
on 2017-02-27 11:30
What does it mean that a gem "is being commented"?

Does the work run outside Ruby mine?
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2017-02-27 15:09
Stan Vince wrote in post #1185591:
> While running the test in Ruby mine am seeing the following error
> "cannot load such file -- win32/screenshot (LoadError)". HOwever, i see
> gem 'win32ole-pp' is being commented. Cant find any resolution that
> worked so far? can someone help please?

This run right, on win10:
> gem install win32-screenshot
> ruby -rwin32/screenshot -e
"Win32::Screenshot::Take.of(:foreground).write!('image.png')"
0fa73332c8e4a3b06ea439fd3f034322?d=identicon&s=25 Ronald Fischer (rovf)
on 2017-02-27 15:46
In this case, it looks to me more like RubyMine issue than a RubyIssue.
Of course you could verify that GEM_HOME, respectively GEM_PATH, is set
correctly when running from within RubyMine, but if this looks correct,
I would ask in a specific RubyMine forum.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.