Trying to get started, getting a lot of failing specs

I am trying to get Discourse setup locally. However I am finding I get a lot of failing specs. Im on Ruby 2.7.6 and Postgresql 14.5 (with hstore installed). I feel like something is wrong, but not sure what…

Finished in 19 minutes 12 seconds (files took 9.7 seconds to load)
17704 examples, 34 failures, 7 pending

Failed examples:

rspec ./spec/models/report_spec.rb:1194 # Report consolidated_page_views with no data works
rspec ./spec/models/report_spec.rb:1212 # Report consolidated_page_views with data works
rspec './spec/models/report_spec.rb[1:10:2:1]' # Report http_total request reports with http_total returns a report with data
rspec './spec/models/report_spec.rb[1:10:1:1]' # Report http_total request reports with no http_total records returns an empty report
rspec './spec/models/report_spec.rb[1:17:2:1]' # Report page_view_logged_in request reports with page_view_logged_in returns a report with data
rspec './spec/models/report_spec.rb[1:17:1:1]' # Report page_view_logged_in request reports with no page_view_logged_in records returns an empty report
rspec './spec/models/report_spec.rb[1:18:1:1]' # Report page_view_anon request reports with no page_view_anon records returns an empty report
rspec './spec/models/report_spec.rb[1:18:2:1]' # Report page_view_anon request reports with page_view_anon returns a report with data
rspec './spec/models/report_spec.rb[1:16:2:1]' # Report page_view_crawler request reports with page_view_crawler returns a report with data
rspec './spec/models/report_spec.rb[1:16:1:1]' # Report page_view_crawler request reports with no page_view_crawler records returns an empty report
rspec './spec/models/report_spec.rb[1:11:1:1]' # Report http_2xx request reports with no http_2xx records returns an empty report
rspec './spec/models/report_spec.rb[1:11:2:1]' # Report http_2xx request reports with http_2xx returns a report with data
rspec ./spec/system/bookmarks_spec.rb:51 # Bookmarking posts and topics allows the topic to be bookmarked
rspec ./spec/system/bookmarks_spec.rb:9 # Bookmarking posts and topics allows logged in user to create bookmarks with and without reminders
rspec ./spec/system/bookmarks_spec.rb:36 # Bookmarking posts and topics does not create a bookmark if the modal is closed with the cancel button
rspec ./spec/requests/theme_javascripts_controller_spec.rb:129 # ThemeJavascriptsController#show_tests includes theme uploads URLs in the settings object
rspec ./spec/models/topic_spec.rb:661 # Topic.similar_to with a similar topic returns the similar topic even if raw is blank
rspec ./spec/models/topic_spec.rb:657 # Topic.similar_to with a similar topic returns the similar topic if the title is similar
rspec ./spec/models/topic_spec.rb:698 # Topic.similar_to with a similar topic with secure categories should return the cat since the user can see it
rspec ./spec/jobs/clean_up_crawler_stats_spec.rb:17 # Jobs::CleanUpCrawlerStats keeps only the top records from the previous day
rspec ./spec/lib/middleware/request_tracker_spec.rb:64 # Middleware::RequestTracker log_request can log requests correctly
rspec ./spec/lib/middleware/request_tracker_spec.rb:53 # Middleware::RequestTracker log_request can exclude/include based on custom header
rspec ./spec/lib/middleware/request_tracker_spec.rb:103 # Middleware::RequestTracker log_request can log Discourse user agent requests correctly
rspec ./spec/lib/middleware/request_tracker_spec.rb:166 # Middleware::RequestTracker log_request when ignoring anonymous page views ignores anonymous requests for private sites
rspec ./spec/lib/middleware/request_tracker_spec.rb:151 # Middleware::RequestTracker log_request when ignoring anonymous page views does not ignore anonymous requests for public sites
rspec ./spec/requests/omniauth_callbacks_controller_spec.rb:109 # Users::OmniauthCallbacksController Google Oauth2 request should handle common errors
rspec ./spec/requests/omniauth_callbacks_controller_spec.rb:134 # Users::OmniauthCallbacksController Google Oauth2 request with CSRF protection enabled should be CSRF protected
rspec ./spec/lib/search_spec.rb:1665 # Search Advanced search can match exact phrases
rspec ./spec/lib/search_spec.rb:1853 # Search Advanced search supports category slug and tags
rspec ./spec/lib/search_spec.rb:1838 # Search Advanced search can search URLS correctly
rspec ./spec/lib/search_spec.rb:1675 # Search Advanced search can search numbers correctly, and match exact phrases
rspec ./spec/models/application_request_spec.rb:19 # ApplicationRequest can log app requests
rspec ./spec/models/optimized_image_spec.rb:179 # OptimizedImage.crop .downsize should downsize logo (requires ImageMagick 7)
rspec ./spec/models/web_crawler_request_spec.rb:13 # WebCrawlerRequest can log crawler requests
1 Like

Ruby version looks good. I’m still on pg 13 for development, so using pg 14 could be an issue.

Did you run RAILS_ENV=test bin/rails db:migrate prior to running RAILS_ENV=test bin/rspec?