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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9ee600d22b5cf5b68ba7499decacc12b?d=identicon&s=25 Stan V. (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?
3a81ced4012650ca2004c9bff7b18202?d=identicon&s=25 Ronald F. (rovf)
on 2017-02-27 11:30
What does it mean that a gem "is being commented"?

Does the work run outside Ruby mine?
9d2d160377d47a2144b12d36ab63126f?d=identicon&s=25 Regis d. (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')"
3a81ced4012650ca2004c9bff7b18202?d=identicon&s=25 Ronald F. (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.
This topic is locked and can not be replied to.