Installing Ruby, Watir, and Webdrivers
In the Fundamentals course we install an exhaustive set of tools using the Founder/Hacker Installer: https://install.founderhacker.com
If you didn't take the Fundamentals course, or weren't able to install all the libraries, that's OK. This web scraping series does not require the use of Rails, Postgres, or running a local server.
Step 1
Install Ruby (guides for Windows, Mac)
Step 2 (Mac)
Install webdrivers gem via "gem install webdrivers" in your terminal.
Step 2 (Windows)
Go here, select the driver for your version of Chrome, then download the "win32.exe" file.
(Figure out which version of Google Chrome you have by inputting "chrome://settings/help" into your browser's address bar and hitting enter.)
Step 3
Install Watir.
Step 4
Test everything works by opening your terminal / command prompt, then:
If you didn't take the Fundamentals course, or weren't able to install all the libraries, that's OK. This web scraping series does not require the use of Rails, Postgres, or running a local server.
Step 1
Install Ruby (guides for Windows, Mac)
Step 2 (Mac)
Install webdrivers gem via "gem install webdrivers" in your terminal.
Step 2 (Windows)
Go here, select the driver for your version of Chrome, then download the "win32.exe" file.
(Figure out which version of Google Chrome you have by inputting "chrome://settings/help" into your browser's address bar and hitting enter.)
Step 3
Install Watir.
Step 4
Test everything works by opening your terminal / command prompt, then:
irb # hit enter, this will open your Ruby shell) require 'watir' # hit enter # expected result: => true
===
Troubleshooting
"webdrivers" -- if you have trouble when starting the Watir gem due to an issue with webdrivers:
Step 1 - Go here and download the latest Chromedriver binary file. When you click a link it will take you to a page that looks like this:
Click whichever file is most relevant to your computer. For me I chose "mac64" because I have an older macbook without the "M1" chip.
Step 2 - Install (execute) the file by first unzipping it, then inside your terminal navigating to this file's location (e.g. your Downloads folder) and running: "./chromedriver" -- your screen will look like this:
Step 3 - Move the file to your binary path to make it usable by the Watir gem. Do this via "mv /usr/local/bin" from the same directory as the file, e.g. your Downloads folder.
If you have any other issues with setting up your environment, email me at code@founderhacker.com.