Or little computing tricks and hacks
Postgresql, rspec and selenium-webdriver
August 30, 2013Posted by on
First, I could not install the gem as there were some header files missing. That was solved following this.
Then I could not run the test with rspec. Actually, I could not even run the app in the browser. There were actually more than one problem there, and I’ll start enumerating in the way I found them or solved them.
In this web page, there is a full description on how to properly install psql as a gem in ubuntu. After reading this pages, I noticed that I was trying to get psql running as a gem, à la cowgirl, skipping essential steps, such as: not creating the appropriate database for development and testing and not making sure that the user had access to the databases, and not updating the database.yml file correctly.
This last one had me wonder, because, even after following all the instructions, sqlite3 was still being looked for. That was due to the fact that the file database.yml lives in the config directory and not in the root. This fixed the fact that I could not even view my web page but rsepc was still not running.
This one, this one, and this other other one, are three very similar posts suggesting that the version of selenium-webdriver used, is out of date. In my experience with the tutorial, it was working fine with sqlite3 but clashing with psql.
After the suggested change, that is, updating the Gemfile to upgrade the version of selenium-webdriver:
selenium-webdriver' to '~> 2.35.1
the test running rspec works.