jeudi 11 mai 2017

C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- watir (LoadError)

I'm new to Ruby and I have very little practice. I'm having difficulty compiling the instabot that is demonstrated in the following video: Build an Instagram autofollow bot

The error that appears is:

C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- watir (LoadError)
        from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from auto_follow.rb:1:in `<main>'

My code is like this:

require 'watir '
require_relative 'credentials'

username = $username
password = $password

user = 'justinbieber'

#abrir o browser e navegar até a página de login

browser = Watir::Browser.new :chrome
browser.goto = "http://ift.tt/1OyNf88"

#navegando para os campos de login e senha e injetando informações
puts "Login in..."
browser.text_field(:name => "username").set "#{username}"
browser.text_field(:name => "password").set "#{password}"


#clicando no botao
browser.button(:class => '_ah57t _84y62 _i46jh _rmr7s').click

sleep(360)

Aucun commentaire:

Enregistrer un commentaire