Bob_Hatch
(Bob Hatch)
1
I downloaded and installed the Ruby Gem called
win32screenshot-1.0.2.gem. I installed it by typing the following:
gem install win32screenshot
It seemed to install fine. However, when I run the program I get the
following error:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to
load -- win32/screenshot (LoadError)
Here is my program:
require 'win32/screenshot'
count = 0
while count != 10
count = count+1
Win32::Screenshot::Take.of(:foreground).write("c:\\scrn_cap" +
count.to_s() + ".jpg")
sleep(600)
end
···
--
Posted via http://www.ruby-forum.com/.
require 'win32/screenshot'
count = 0
while count != 10
count = count+1
Win32::Screenshot::Take.of(:foreground).write("c:\\scrn_cap" +
count.to_s() + ".jpg")
sleep(600)
end
You probably need to require RubyGems first.
require 'rubygems'
require 'win32/screenshot'
count = 0
while count != 10
count = count+1
Win32::Screenshot::Take.of(:foreground).write("c:\\scrn_cap" +
count.to_s() + ".jpg")
sleep(600)
end
If you don't want to explicitly require RubyGems then you can specify it in RUBYOPT. See the post-install instructions here:
http://docs.rubygems.org/read/chapter/3
···
On Friday, February 11, 2011 at 4:55 PM, Bob Hatch wrote:
What version of Ruby? how you know it installed fine? Does it shows on
"gem list win32" ?
What is the result of the following:
ruby -v -e "require 'rubygems'; require 'win32/screenshot'"
···
On Feb 11, 8:55 pm, Bob Hatch <hatch...@hotmail.com> wrote:
I downloaded and installed the Ruby Gem called
win32screenshot-1.0.2.gem. I installed it by typing the following:
gem install win32screenshot
It seemed to install fine. However, when I run the program I get the
following error:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to
load -- win32/screenshot (LoadError)
--
Luis Lavena
<internal:lib/rubygems/custom_require>:29:in `require': no such file to
load -- win32/screenshot (LoadError)
Ah, ignore my earlier message. I skipped right over this which shows RubyGems in the mix. Apologies.
···
On Friday, February 11, 2011 at 4:55 PM, Bob Hatch wrote:
Might I suggest:
10.times do |n|
# look! I'm indented!
Win32::Screenshot::Take.of(:foreground).write "c:\\scrn_cap#{count}.jpg"
sleep 600
end
···
On Feb 11, 2011, at 15:55 , Bob Hatch wrote:
count = 0
while count != 10
count = count+1
Yang_Bin
(Yang Bin)
6
require 'win32/screenshot'"
···
--
Posted via http://www.ruby-forum.com/.
60636
(60636)
7
hi pleases, s.o.s baby steps
···
On Feb 11, 6:11 pm, Luis Lavena <luislav...@gmail.com> wrote:
On Feb 11, 8:55 pm, Bob Hatch <hatch...@hotmail.com> wrote:
> I downloaded and installed the Ruby Gem called
> win32screenshot-1.0.2.gem. I installed it by typing the following:
> gem install win32screenshot
> It seemed to install fine. However, when I run the program I get the
> following error:
> <internal:lib/rubygems/custom_require>:29:in `require': no such file to
> load -- win32/screenshot (LoadError)
What version of Ruby? how you know it installed fine? Does it shows on
"gem list win32" ?
What is the result of the following:
ruby -v -e "require 'rubygems'; require 'win32/screenshot'"
--
Luis Lavena