openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 914 forks source link

"bundle exec rake test:db" failure #2337

Closed Legolash2o closed 5 years ago

Legolash2o commented 5 years ago

Hi, I've installed the latest Ubuntu release (18.04) and when running the "bundle exec rake test:db", I keep getting thrown the error below for each test.

I followed the guide to the letter. I did have to update gems as the "make" commands didn't work. https://github.com/openstreetmap/openstreetmap-website/blob/master/INSTALL.md

bin/rails test test/system/report_diary_entry_test.rb:37

E

Error:
ReportDiaryEntryTest#test_missing_report_params:
ArgumentError: The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/usr/bin/phantomjs'
    test/application_system_test_case.rb:25:in `block in <class:ApplicationSystemTestCase>'

Error:
ReportDiaryEntryTest#test_missing_report_params:
ArgumentError: The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/usr/bin/phantomjs'

OSM Error

tomhughes commented 5 years ago

Seems like you have a broken phantomjs.

tomhughes commented 5 years ago

What does phantomjs --version say?

Legolash2o commented 5 years ago

It wouldn't display as it couldn't find a screen ("X") to display.

I removed phantomjs and then reinstalled after running:

sudo apt-get install build-essential chrpath sudo apt-get install libfreetype6 libfreetype6-dev sudo apt-get install libfontconfig1 libfontconfig1-dev phantomjs

Now it works apart from a few undefined is not a function jQuery error message.

tomhughes commented 5 years ago

Ah that's because Ubuntu's phantomjs is a bit broken and is built to require X for some silly reason.