Install discourse on localhost

OK,

i’m trying to install discourse on localhost for a bit of testing/development. I’m running Linux Mint Rafaela (Ubuntu 14.04)

I followed this guide: Beginners Guide to Install Discourse on Ubuntu for Development

I already have some rails apps I am working with on this machine so I have most of what is needed (upgraded postgres from 9.3 to 9.6 though as I don’t think I would get away with 9.3 for discourse), but other than that everything else either was there or I installed it (I think)…

So, on running the tests it seems I have a lot of failures out of the box and then the tests implode:

/home/johnny/.rvm/gems/ruby-2.3.4/gems/rspec-support-3.6.0/lib/rspec/support.rb:28:in `require_relative': cannot load such file -- /home/johnny/.rvm/gems/ruby-2.3.4/gems/rspec-support-3.6.0/lib/rspec/support/source (LoadError)

I’m thinking this is a problem with my setup?

Any ideas on where I am going wrong or what I can do to fix it?

Johnny

ps - I’m using rvm rather than rbenv, but surely that can’t be causing problems can it?

1 Like

OK - in the absence of anything else to try I swapped out rvm for rbenv just to be safe…

No help unfortunately:

`/home/johnny/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-support-3.6.0/lib/rspec/support.rb:28:in `require_relative': cannot load such file -- /home/johnny/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-support-3.6.0/lib/rspec/support/source (LoadError)`

so - any ideas why this is failing so hard?

As this is happening in the same place with rvm or rbenv with almost exactly the same error, does that mean there is a problem with rspec or is it a problem with autospec?

I’m really at a loss here as I updated everything needed for this to latest version, upgraded postgres, cloned the repo, and the tests fail immediately…

I’ve tried updating all the gems, removing discourse completely and starting again, re ran migrations and it seems to have moved forward slightly… Last tets run it didn’t just implode but did limp to the end of the tests
I’ll attach failing output in next reply if anyone can give me some pointers on how to resolve the 265 failures (I’m assuming these should not be failing on a brand new install)

Finished in 16 minutes 11 seconds (files took 35.58 seconds to load)
7464 examples, 265 failures

Failed examples:

rspec ./spec/components/cooked_post_processor_spec.rb:249 # CookedPostProcessor.post_process_images topic image adds a topic image if there's one in the first post
rspec ./spec/components/post_creator_spec.rb:543 # PostCreator existing topic success create correctly
rspec ./spec/components/post_creator_spec.rb:165 # PostCreator new topic success extracts links from the post
rspec ./spec/requests/topics_controller_spec.rb:10 # TopicsController#timings should record the timing
rspec ./spec/models/user_profile_spec.rb:117 # UserProfile bio excerpt emojis supports emoji images
rspec ./spec/controllers/topics_controller_spec.rb:1266 # TopicsController feature_stats works
rspec ./spec/models/report_spec.rb:211 # Report posts counts only counts regular posts
rspec ./spec/models/report_spec.rb[1:4:1:1] # Report post report no posts returns an empty report
rspec ./spec/models/report_spec.rb[1:4:2:3] # Report post report with posts returns total data
rspec ./spec/models/report_spec.rb[1:3:2:3] # Report topic report with topics returns total data
rspec ./spec/models/report_spec.rb[1:3:1:1] # Report topic report no topics returns an empty report
rspec ./spec/models/report_spec.rb:128 # Report private messages topic report).to not include private messages
rspec ./spec/models/report_spec.rb:136 # Report private messages post report).to not include private messages
rspec ./spec/components/onebox/engine/discourse_local_onebox_spec.rb:15 # Onebox::Engine::DiscourseLocalOnebox for a link to a post returns a link if post isn't found
rspec ./spec/models/topic_user_spec.rb:356 # TopicUser can scope by tracking
rspec ./spec/models/post_spec.rb:754 # Post sort_order regular topic defaults to created order
rspec ./spec/models/post_spec.rb:740 # Post summary returns the OP and posts above the threshold in summary mode
rspec ./spec/components/table_migration_helper_spec.rb:18 # TableMigrationHelper#delayed_drop can drop a table after correct delay and when new table exists
rspec ./spec/models/notification_spec.rb:218 # Notification mark_posts_read marks multiple posts as read if needed
rspec ./spec/components/search_spec.rb:102 # Search escapes non alphanumeric characters
rspec ./spec/components/search_spec.rb:608 # Search Advanced search supports before and after, in:first, user:, @username
rspec ./spec/components/search_spec.rb:724 # Search Advanced search can order by topic creation
rspec ./spec/components/search_spec.rb:783 # Search Advanced search correctly handles #symbol when no tag or category match
rspec ./spec/components/search_spec.rb:666 # Search Advanced search can find by status
rspec ./spec/controllers/posts_controller_spec.rb:389 # PostsController edit a post when logged in as a regular user extracts links from the new body
rspec ./spec/models/top_topic_spec.rb:38 # TopTopic refresh! after calculating should have top topics
rspec ./spec/components/column_dropper_spec.rb:17 # ColumnDropper can correctly drop columns after correct delay
rspec ./spec/components/column_dropper_spec.rb:75 # ColumnDropper.mark_readonly should be droppable
rspec ./spec/components/wizard/step_updater_spec.rb:41 # Wizard::StepUpdater updates the introduction step
rspec ./spec/jobs/fix_primary_emails_for_staged_users_spec.rb:4 # Jobs::FixPrimaryEmailsForStagedUsers should clean up duplicated staged users
rspec ./spec/components/topic_query_spec.rb:14 # TopicQuery secure category filters categories out correctly
rspec ./spec/components/topic_query_spec.rb:336 # TopicQuery a bunch of topics list_latest sort_order returns the topics in correct order
rspec ./spec/models/topic_spec.rb:1959 # Topic#with_no_response returns 1 with one topic that doesn't have regular replies
rspec ./spec/models/topic_spec.rb:1943 # Topic#with_no_response returns 1 with one topic that has a reply by the first poster
rspec ./spec/models/topic_spec.rb:1951 # Topic#with_no_response returns 0 with a topic with 1 reply
rspec ./spec/models/topic_spec.rb:1936 # Topic#with_no_response returns 1 with one topic that has no replies and author was changed on first post
rspec ./spec/models/topic_spec.rb:1929 # Topic#with_no_response returns 1 with one topic that has no replies
rspec ./spec/models/topic_spec.rb:1925 # Topic#with_no_response returns nothing with no topics
rspec ./spec/models/topic_spec.rb:1556 # Topic#listable_count_per_day collect closed interval listable topics count
rspec ./spec/models/topic_spec.rb:1132 # Topic scopes #by_most_recently_created returns topics ordered by created_at desc, id desc
rspec ./spec/multisite/site_settings_spec.rb:28 # Multisite SiteSettings #default_locale should return the right locale
rspec ./spec/jobs/about_stats_spec.rb:4 # Jobs::AboutStats caches the stats
rspec ./spec/components/current_user_spec.rb:5 # CurrentUser allows us to lookup a user from our environment
rspec ./spec/models/username_validator_spec.rb:5 # UsernameValidator#valid_format? returns true when username is both valid and available
rspec ./spec/models/username_validator_spec.rb:13 # UsernameValidator#valid_format? returns false when the username is not valid
rspec ./spec/models/username_validator_spec.rb:9 # UsernameValidator#valid_format? returns true when the username is valid but not available
rspec ./spec/jobs/automatic_group_membership_spec.rb:10 # Jobs::AutomaticGroupMembership updates the membership
rspec ./spec/jobs/automatic_group_membership_spec.rb:6 # Jobs::AutomaticGroupMembership raises an error when the group id is missing
rspec ./spec/models/topic_tracking_state_spec.rb:13 # TopicTrackingState can correctly publish unread
rspec ./spec/models/topic_tracking_state_spec.rb:42 # TopicTrackingState correctly handles capping
rspec ./spec/models/topic_tracking_state_spec.rb:18 # TopicTrackingState correctly handles muted categories
rspec ./spec/models/topic_tracking_state_spec.rb:69 # TopicTrackingState correctly gets the tracking state
rspec ./spec/requests/admin/admin_controller_spec.rb:4 # Admin::AdminController should return the right response if user isn't a staff
rspec ./spec/services/i18n_interpolation_keys_finder_spec.rb:6 # I18nInterpolationKeysFinder#find should return the right keys
rspec ./spec/components/middleware/request_tracker_spec.rb:39 # Middleware::RequestTracker log_request can log requests correctly
rspec ./spec/components/middleware/request_tracker_spec.rb:29 # Middleware::RequestTracker log_request can exclude/include based on custom header
rspec ./spec/components/suggested_topics_builder_spec.rb:54 # SuggestedTopicsBuilder returns full correctly
rspec ./spec/components/suggested_topics_builder_spec.rb:47 # SuggestedTopicsBuilder has the correct defaults
rspec ./spec/components/suggested_topics_builder_spec.rb:61 # SuggestedTopicsBuilder adding results adds nothing with nil results
rspec ./spec/components/suggested_topics_builder_spec.rb:91 # SuggestedTopicsBuilder adding results adding topics that are not open adds archived and closed, but not invisible topics
rspec ./spec/components/suggested_topics_builder_spec.rb:101 # SuggestedTopicsBuilder adding results category definition topics doesn't add a category definition topic
rspec ./spec/components/suggested_topics_builder_spec.rb:76 # SuggestedTopicsBuilder adding results adding topics added the result correctly
rspec ./spec/components/suggested_topics_builder_spec.rb:34 # SuggestedTopicsBuilder splicing category results inserts using default approach for non high priority
rspec ./spec/components/suggested_topics_builder_spec.rb:41 # SuggestedTopicsBuilder splicing category results inserts multiple results and puts topics in the correct order
rspec ./spec/components/suggested_topics_builder_spec.rb:23 # SuggestedTopicsBuilder splicing category results prioritizes category correctly
rspec ./spec/models/trust_level3_requirements_spec.rb:140 # TrustLevel3Requirements topics_viewed counts topics views within last 100 days (default time period), not counting a topic more than once
rspec ./spec/models/trust_level3_requirements_spec.rb:149 # TrustLevel3Requirements topics_viewed counts topics views within last 200 days, respecting tl3_time_period setting
rspec ./spec/models/trust_level3_requirements_spec.rb:101 # TrustLevel3Requirements days_visited counts visits when posts were read no further back than 100 days (default time period) ago
rspec ./spec/models/trust_level3_requirements_spec.rb:110 # TrustLevel3Requirements days_visited respects tl3_time_period setting
rspec ./spec/models/trust_level3_requirements_spec.rb:239 # TrustLevel3Requirements num_likes_received counts likes received in the last 100 days
rspec ./spec/models/trust_level3_requirements_spec.rb:216 # TrustLevel3Requirements with flagged posts num_flagged_posts and num_flagged_by_users count spam and inappropriate agreed flags in the last 100 days
rspec ./spec/models/trust_level3_requirements_spec.rb:369 # TrustLevel3Requirements requirements with defaults are lost if not enough likes received by different users
rspec ./spec/models/trust_level3_requirements_spec.rb:339 # TrustLevel3Requirements requirements with defaults are not met if not enough likes received on different days
rspec ./spec/models/trust_level3_requirements_spec.rb:334 # TrustLevel3Requirements requirements with defaults are not met if not enough likes received
rspec ./spec/models/trust_level3_requirements_spec.rb:349 # TrustLevel3Requirements requirements with defaults are lost if not enough likes given
rspec ./spec/models/trust_level3_requirements_spec.rb:359 # TrustLevel3Requirements requirements with defaults are not met if suspended
rspec ./spec/models/trust_level3_requirements_spec.rb:354 # TrustLevel3Requirements requirements with defaults are lost if not enough likes received
rspec ./spec/models/trust_level3_requirements_spec.rb:344 # TrustLevel3Requirements requirements with defaults are not met if not enough likes received by different users
rspec ./spec/models/trust_level3_requirements_spec.rb:299 # TrustLevel3Requirements requirements with defaults are not lost if requirements are close
rspec ./spec/models/trust_level3_requirements_spec.rb:290 # TrustLevel3Requirements requirements with defaults are met when all requirements are met
rspec ./spec/models/trust_level3_requirements_spec.rb:294 # TrustLevel3Requirements requirements with defaults are not met if too few days visited
rspec ./spec/models/trust_level3_requirements_spec.rb:309 # TrustLevel3Requirements requirements with defaults are lost if not enough visited
rspec ./spec/models/trust_level3_requirements_spec.rb:319 # TrustLevel3Requirements requirements with defaults are lost if not enough topics viewed
rspec ./spec/models/trust_level3_requirements_spec.rb:314 # TrustLevel3Requirements requirements with defaults are lost if not enough topics replied to
rspec ./spec/models/trust_level3_requirements_spec.rb:374 # TrustLevel3Requirements requirements with defaults are lost if suspended
rspec ./spec/models/trust_level3_requirements_spec.rb:364 # TrustLevel3Requirements requirements with defaults are lost if not enough likes received on different days
rspec ./spec/models/trust_level3_requirements_spec.rb:329 # TrustLevel3Requirements requirements with defaults are not met if not enough likes given
rspec ./spec/models/trust_level3_requirements_spec.rb:324 # TrustLevel3Requirements requirements with defaults are lost if not enough posts read
rspec ./spec/models/trust_level3_requirements_spec.rb:123 # TrustLevel3Requirements num_topics_replied_to counts topics in which user replied in last 100 days
rspec ./spec/models/trust_level3_requirements_spec.rb:173 # TrustLevel3Requirements topics_viewed_all_time counts topics viewed at any time
rspec ./spec/models/trust_level3_requirements_spec.rb:51 # TrustLevel3Requirements requirements min_posts_read is capped
rspec ./spec/models/trust_level3_requirements_spec.rb:17 # TrustLevel3Requirements requirements time_period uses site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:63 # TrustLevel3Requirements requirements min_posts_read_all_time depends on site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:45 # TrustLevel3Requirements requirements min_posts_read depends on site setting and number of posts created
rspec ./spec/models/trust_level3_requirements_spec.rb:58 # TrustLevel3Requirements requirements min_topics_viewed_all_time depends on site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:22 # TrustLevel3Requirements requirements min_days_visited uses site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:91 # TrustLevel3Requirements requirements min_likes_received_days works when time_period is 1
rspec ./spec/models/trust_level3_requirements_spec.rb:27 # TrustLevel3Requirements requirements min_topics_replied_to uses site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:32 # TrustLevel3Requirements requirements min_topics_viewed depends on site setting and number of topics created
rspec ./spec/models/trust_level3_requirements_spec.rb:38 # TrustLevel3Requirements requirements min_topics_viewed is capped
rspec ./spec/models/trust_level3_requirements_spec.rb:78 # TrustLevel3Requirements requirements min_likes_received depends on site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:68 # TrustLevel3Requirements requirements max_flagged_posts depends on site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:85 # TrustLevel3Requirements requirements min_likes_received_days is capped
rspec ./spec/models/trust_level3_requirements_spec.rb:73 # TrustLevel3Requirements requirements min_likes_given depends on site setting
rspec ./spec/models/trust_level3_requirements_spec.rb:162 # TrustLevel3Requirements posts_read counts posts read within the last 100 days
rspec ./spec/models/trust_level3_requirements_spec.rb:183 # TrustLevel3Requirements posts_read_all_time counts posts read at any time
rspec ./spec/models/trust_level3_requirements_spec.rb:223 # TrustLevel3Requirements num_likes_given counts likes given in the last 100 days
rspec ./spec/models/user_option_spec.rb:26 # UserOption should_be_redirected_to_top should not be redirected to top when there is no reason to
rspec ./spec/models/user_option_spec.rb:21 # UserOption should_be_redirected_to_top should be redirected to top when there is a reason to
rspec ./spec/models/user_option_spec.rb:58 # UserOption.redirected_to_top should have no reason when `SiteSetting.redirect_users_to_top_page` is disabled
rspec ./spec/models/user_option_spec.rb:66 # UserOption.redirected_to_top when `SiteSetting.redirect_users_to_top_page` is enabled should have no reason when top is not in the `SiteSetting.top_menu`
rspec ./spec/models/user_option_spec.rb:74 # UserOption.redirected_to_top when `SiteSetting.redirect_users_to_top_page` is enabled and when top is in the `SiteSetting.top_menu` should have no reason when there are not enough topics
rspec ./spec/models/user_option_spec.rb:89 # UserOption.redirected_to_top when `SiteSetting.redirect_users_to_top_page` is enabled and when top is in the `SiteSetting.top_menu` and there are enough topics a new user should have a reason for the first visit
rspec ./spec/models/user_option_spec.rb:94 # UserOption.redirected_to_top when `SiteSetting.redirect_users_to_top_page` is enabled and when top is in the `SiteSetting.top_menu` and there are enough topics a new user should not have a reason for next visits
rspec ./spec/models/user_option_spec.rb:105 # UserOption.redirected_to_top when `SiteSetting.redirect_users_to_top_page` is enabled and when top is in the `SiteSetting.top_menu` and there are enough topics an older user should have a reason when the user hasn't been seen in a month
rspec ./spec/models/user_option_spec.rb:7 # UserOption#ensure_consistency! recreates missing user option records
rspec ./spec/models/user_option_spec.rb:48 # UserOption#mailing_list_mode should return the stored value when `SiteSetting.disable_mailing_list_mode` is disabled
rspec ./spec/models/user_option_spec.rb:42 # UserOption#mailing_list_mode should return false when `SiteSetting.disable_mailing_list_mode` is enabled
rspec ./spec/components/stats_socket_spec.rb:21 # StatsSocket can respond to various stats commands
rspec ./spec/controllers/wizard_controller_spec.rb:35 # WizardController wizard enabled returns JSON when the mime type is appropriate
rspec ./spec/controllers/wizard_controller_spec.rb:22 # WizardController wizard enabled raises an error if the wizard is disabled
rspec ./spec/controllers/wizard_controller_spec.rb:12 # WizardController wizard enabled needs you to be logged in
rspec ./spec/controllers/wizard_controller_spec.rb:29 # WizardController wizard enabled renders the wizard if you are an admin
rspec ./spec/controllers/wizard_controller_spec.rb:16 # WizardController wizard enabled raises an error if you aren't an admin
rspec ./spec/components/redis_store_spec.rb:29 # Redis Store doesn't collide with our Cache
rspec ./spec/components/redis_store_spec.rb:19 # Redis Store can store stuff
rspec ./spec/components/redis_store_spec.rb:44 # Redis Store can be cleared without clearing our cache
rspec ./spec/components/topic_creator_spec.rb:69 # TopicCreator#create private message success cases min_trust_to_create_topic setting should not be checked when sending private message
rspec ./spec/components/topic_creator_spec.rb:65 # TopicCreator#create private message success cases should be possible for a regular user to send private message
rspec ./spec/components/topic_creator_spec.rb:74 # TopicCreator#create private message success cases should be possible for a trusted user to send private messages via email
rspec ./spec/components/topic_creator_spec.rb:84 # TopicCreator#create private message failure cases min_trust_to_send_messages setting should be checked when sending private message
rspec ./spec/components/topic_creator_spec.rb:92 # TopicCreator#create private message failure cases min_trust_to_send_email_messages should be checked when sending private messages via email
rspec ./spec/components/topic_creator_spec.rb:21 # TopicCreator#create topic success cases should be possible for an admin to create a topic
rspec ./spec/components/topic_creator_spec.rb:25 # TopicCreator#create topic success cases should be possible for a moderator to create a topic
rspec ./spec/components/topic_creator_spec.rb:36 # TopicCreator#create topic success cases regular user should be possible for a regular user to create a topic with blank auto_close_time
rspec ./spec/components/topic_creator_spec.rb:46 # TopicCreator#create topic success cases regular user category name is case insensitive
rspec ./spec/components/topic_creator_spec.rb:32 # TopicCreator#create topic success cases regular user should be possible for a regular user to create a topic
rspec ./spec/components/topic_creator_spec.rb:40 # TopicCreator#create topic success cases regular user ignores auto_close_time without raising an error
rspec ./spec/components/validators/reply_by_email_address_validator_spec.rb:26 # ReplyByEmailAddressValidator#valid_value? returns true when value is OK
rspec ./spec/components/validators/reply_by_email_address_validator_spec.rb:8 # ReplyByEmailAddressValidator#valid_value? returns true for blank values
rspec ./spec/components/validators/reply_by_email_address_validator_spec.rb:17 # ReplyByEmailAddressValidator#valid_value? returns false if value does not contain '%{reply_key}'
rspec ./spec/components/validators/reply_by_email_address_validator_spec.rb:21 # ReplyByEmailAddressValidator#valid_value? returns false if value is the same as SiteSetting.notification_email
rspec ./spec/components/validators/reply_by_email_address_validator_spec.rb:13 # ReplyByEmailAddressValidator#valid_value? returns false if value is not an email address
rspec ./spec/jobs/pending_queued_posts_reminder_spec.rb:19 # Jobs::PendingQueuedPostReminder notify_about_queued_posts_after is 24 doesn't email if there are no queued posts
rspec ./spec/jobs/pending_queued_posts_reminder_spec.rb:33 # Jobs::PendingQueuedPostReminder notify_about_queued_posts_after is 24 doesn't email again about the same posts
rspec ./spec/jobs/pending_queued_posts_reminder_spec.rb:26 # Jobs::PendingQueuedPostReminder notify_about_queued_posts_after is 24 emails if there are new queued posts
rspec ./spec/jobs/pending_queued_posts_reminder_spec.rb:7 # Jobs::PendingQueuedPostReminder notify_about_queued_posts_after is 0 never emails
rspec ./spec/jobs/reindex_search_spec.rb[1:2] # Jobs::ReindexSearch should rebuild `post` when INDEX_VERSION changed
rspec ./spec/jobs/reindex_search_spec.rb[1:4] # Jobs::ReindexSearch should rebuild `category` when INDEX_VERSION changed
rspec ./spec/jobs/reindex_search_spec.rb[1:6] # Jobs::ReindexSearch should rebuild `user` when INDEX_VERSION changed
rspec ./spec/jobs/reindex_search_spec.rb[1:5] # Jobs::ReindexSearch should rebuild `user` when default_locale changed
rspec ./spec/jobs/reindex_search_spec.rb[1:3] # Jobs::ReindexSearch should rebuild `category` when default_locale changed
rspec ./spec/jobs/reindex_search_spec.rb[1:1] # Jobs::ReindexSearch should rebuild `post` when default_locale changed
rspec ./spec/requests/admin/backups_controller_spec.rb:26 # Admin::BackupsController#cancel should cancel an backup
rspec ./spec/requests/admin/backups_controller_spec.rb:34 # Admin::BackupsController#cancel should not allow cancel via a GET request
rspec ./spec/requests/admin/backups_controller_spec.rb:19 # Admin::BackupsController#rollback should not allow rollback via a GET request
rspec ./spec/requests/admin/backups_controller_spec.rb:11 # Admin::BackupsController#rollback should rollback the restore
rspec ./spec/controllers/admin/versions_controller_spec.rb:13 # Admin::VersionsController is a subclass of AdminController
rspec ./spec/controllers/admin/versions_controller_spec.rb:31 # Admin::VersionsController while logged in as an admin show should return the installed version
rspec ./spec/controllers/admin/versions_controller_spec.rb:24 # Admin::VersionsController while logged in as an admin show 
rspec ./spec/controllers/admin/versions_controller_spec.rb:26 # Admin::VersionsController while logged in as an admin show should return the currently available version
rspec ./spec/jobs/pending_flags_reminder_spec.rb:38 # Jobs::PendingFlagsReminder notify_about_flags_after is 48 doesn't send a message if there are no new flags older than 48 hours old
rspec ./spec/jobs/pending_flags_reminder_spec.rb:24 # Jobs::PendingFlagsReminder notify_about_flags_after is 48 doesn't send message when flags are less than 48 hours old
rspec ./spec/jobs/pending_flags_reminder_spec.rb:31 # Jobs::PendingFlagsReminder notify_about_flags_after is 48 sends message when there is a flag older than 48 hours
rspec ./spec/jobs/pending_flags_reminder_spec.rb:7 # Jobs::PendingFlagsReminder notify_about_flags_after is 0 never notifies
rspec ./spec/services/user_activator_spec.rb:16 # UserActivator email_activator creates and send new email token if the existing token expired
rspec ./spec/services/user_activator_spec.rb:7 # UserActivator email_activator does not create new email token unless required
rspec ./spec/models/user_auth_token_spec.rb:88 # UserAuthToken expires correctly
rspec ./spec/models/user_auth_token_spec.rb:116 # UserAuthToken can properly rotate tokens
rspec ./spec/models/user_auth_token_spec.rb:73 # UserAuthToken can rotate with no params maintaining data
rspec ./spec/models/user_auth_token_spec.rb:5 # UserAuthToken can remove old expired tokens
rspec ./spec/models/user_auth_token_spec.rb:56 # UserAuthToken can validate token was seen at lookup time
rspec ./spec/models/user_auth_token_spec.rb:192 # UserAuthToken can correctly log auth tokens
rspec ./spec/models/user_auth_token_spec.rb:169 # UserAuthToken keeps prev token valid for 1 minute after it is confirmed
rspec ./spec/models/user_auth_token_spec.rb:34 # UserAuthToken can lookup both hashed and unhashed
rspec ./spec/models/user_auth_token_spec.rb:259 # UserAuthToken will not mark token unseen when prev and current are the same
rspec ./spec/models/optimized_image_spec.rb:10 # OptimizedImage.safe_path? correctly detects unsafe paths
rspec ./spec/models/optimized_image_spec.rb:82 # OptimizedImage.create_for when using an internal store when the thumbnail is properly generated closes and removes the tempfile
rspec ./spec/models/optimized_image_spec.rb:87 # OptimizedImage.create_for when using an internal store when the thumbnail is properly generated works
rspec ./spec/models/optimized_image_spec.rb:77 # OptimizedImage.create_for when using an internal store when the thumbnail is properly generated does not download a copy of the original image
rspec ./spec/models/optimized_image_spec.rb:64 # OptimizedImage.create_for when using an internal store when an error happened while generating the thumbnail returns nil
rspec ./spec/models/optimized_image_spec.rb:107 # OptimizedImage.create_for external store when an error happened while generatign the thumbnail returns nil
rspec ./spec/models/optimized_image_spec.rb:120 # OptimizedImage.create_for external store when the thumbnail is properly generated downloads a copy of the original image
rspec ./spec/models/optimized_image_spec.rb:126 # OptimizedImage.create_for external store when the thumbnail is properly generated works
rspec ./spec/models/optimized_image_spec.rb:27 # OptimizedImage ensure_safe_paths! raises nothing on safe paths
rspec ./spec/models/optimized_image_spec.rb:33 # OptimizedImage ensure_safe_paths! raises nothing on paths
rspec ./spec/models/optimized_image_spec.rb:46 # OptimizedImage.local? correctly detects local vs remote
rspec ./spec/requests/groups_controller_spec.rb:476 # GroupsController group histories when user is not signed in should raise the right error
rspec ./spec/requests/groups_controller_spec.rb:487 # GroupsController group histories when user is not a group owner should be forbidden
rspec ./spec/requests/groups_controller_spec.rb:508 # GroupsController group histories viewing history public group should allow group owner to view history
rspec ./spec/requests/groups_controller_spec.rb:541 # GroupsController group histories viewing history admin should be able to filter through the history
rspec ./spec/requests/groups_controller_spec.rb:529 # GroupsController group histories viewing history admin should be able to view history
rspec ./spec/requests/groups_controller_spec.rb:561 # GroupsController#request_membership requires the user to log in
rspec ./spec/requests/groups_controller_spec.rb:567 # GroupsController#request_membership requires a reason
rspec ./spec/requests/groups_controller_spec.rb:575 # GroupsController#request_membership should create the right PM
rspec ./spec/requests/groups_controller_spec.rb:681 # GroupsController#search  as an admin returns the right response
rspec ./spec/requests/groups_controller_spec.rb:629 # GroupsController#search  as a normal user returns the right response
rspec ./spec/requests/groups_controller_spec.rb:667 # GroupsController#search  as a group owner returns the right response
rspec ./spec/requests/groups_controller_spec.rb:623 # GroupsController#search  as an anon user returns the right response
rspec ./spec/requests/groups_controller_spec.rb:227 # GroupsController edit when user is not signed in should be fobidden
rspec ./spec/requests/groups_controller_spec.rb:236 # GroupsController edit when user is not signed in public group should be fobidden
rspec ./spec/requests/groups_controller_spec.rb:256 # GroupsController edit when user is not an owner of the group refuses membership changes to unauthorized users
rspec ./spec/requests/groups_controller_spec.rb:273 # GroupsController edit when user is an admin cannot add members to automatic groups
rspec ./spec/requests/groups_controller_spec.rb:212 # GroupsController#members should not allow members to be sorted by columns that are not allowed
rspec ./spec/requests/groups_controller_spec.rb:186 # GroupsController#members should allow members to be sorted by
rspec ./spec/requests/groups_controller_spec.rb:21 # GroupsController#index should return the right response
rspec ./spec/requests/groups_controller_spec.rb:39 # GroupsController#index viewing as an admin should display automatic groups
rspec ./spec/requests/groups_controller_spec.rb:13 # GroupsController#index when group directory is disabled should deny access
rspec ./spec/requests/groups_controller_spec.rb:61 # GroupsController#mentionable should return the right response
rspec ./spec/requests/groups_controller_spec.rb:102 # GroupsController#update when user is group owner should be able update the group
rspec ./spec/requests/groups_controller_spec.rb:140 # GroupsController#update when user is group admin should be able to update the group
rspec ./spec/requests/groups_controller_spec.rb:149 # GroupsController#update when user is not a group owner or admin should not be able to update the group
rspec ./spec/requests/groups_controller_spec.rb:291 # GroupsController membership edits add_members can make incremental adds
rspec ./spec/requests/groups_controller_spec.rb:307 # GroupsController membership edits add_members cannot add members to automatic groups
rspec ./spec/requests/groups_controller_spec.rb:346 # GroupsController membership edits add_members returns 404 if member is not found
rspec ./spec/requests/groups_controller_spec.rb:340 # GroupsController membership edits add_members returns 422 if member already exists
rspec ./spec/requests/groups_controller_spec.rb:387 # GroupsController membership edits add_members public group should not allow an underprivilege user to add another user to a group
rspec ./spec/requests/groups_controller_spec.rb:378 # GroupsController membership edits add_members public group should allow a user to join the group
rspec ./spec/requests/groups_controller_spec.rb:363 # GroupsController membership edits add_members public group admin can make incremental adds
rspec ./spec/requests/groups_controller_spec.rb:318 # GroupsController membership edits add_members is able to add several members to a group adds by username
rspec ./spec/requests/groups_controller_spec.rb:332 # GroupsController membership edits add_members is able to add several members to a group adds by email
rspec ./spec/requests/groups_controller_spec.rb:325 # GroupsController membership edits add_members is able to add several members to a group adds by id
rspec ./spec/requests/groups_controller_spec.rb:398 # GroupsController membership edits #remove_member cannot remove members from automatic groups
rspec ./spec/requests/groups_controller_spec.rb:405 # GroupsController membership edits #remove_member raises an error if user to be removed is not found
rspec ./spec/requests/groups_controller_spec.rb:433 # GroupsController membership edits #remove_member is able to remove a member removes by user_email
rspec ./spec/requests/groups_controller_spec.rb:411 # GroupsController membership edits #remove_member is able to remove a member removes by id
rspec ./spec/requests/groups_controller_spec.rb:418 # GroupsController membership edits #remove_member is able to remove a member removes by username
rspec ./spec/requests/groups_controller_spec.rb:425 # GroupsController membership edits #remove_member is able to remove a member removes user.primary_group_id when user is removed from group
rspec ./spec/requests/groups_controller_spec.rb:462 # GroupsController membership edits #remove_member is able to remove a member public group should not allow a underprivilege user to leave a group for another user
rspec ./spec/requests/groups_controller_spec.rb:453 # GroupsController membership edits #remove_member is able to remove a member public group should allow a user to leave a group
rspec ./spec/requests/groups_controller_spec.rb:445 # GroupsController membership edits #remove_member is able to remove a member public group admin removes by username
rspec ./spec/components/site_settings/defaults_provider_spec.rb:262 # SiteSettings::DefaultsProvider.has_setting? checks name with question mark
rspec ./spec/components/site_settings/defaults_provider_spec.rb:250 # SiteSettings::DefaultsProvider.has_setting? "responds when the arg is string
rspec ./spec/components/site_settings/defaults_provider_spec.rb:246 # SiteSettings::DefaultsProvider.has_setting? returns true when it's present in the cache
rspec ./spec/components/site_settings/defaults_provider_spec.rb:258 # SiteSettings::DefaultsProvider.has_setting? returns false when the key is not exist
rspec ./spec/components/site_settings/defaults_provider_spec.rb:254 # SiteSettings::DefaultsProvider.has_setting? default_locale always exists
rspec ./spec/components/site_settings/defaults_provider_spec.rb:67 # SiteSettings::DefaultsProvider expose default cache according to locale .get returns the default value according to current locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:63 # SiteSettings::DefaultsProvider expose default cache according to locale .get accepts a string as the parameters
rspec ./spec/components/site_settings/defaults_provider_spec.rb:59 # SiteSettings::DefaultsProvider expose default cache according to locale .get returns the default value to a site setting
rspec ./spec/components/site_settings/defaults_provider_spec.rb:89 # SiteSettings::DefaultsProvider expose default cache according to locale .set_regardless_of_locale converts the data type
rspec ./spec/components/site_settings/defaults_provider_spec.rb:100 # SiteSettings::DefaultsProvider expose default cache according to locale .set_regardless_of_locale raises when the value is not valid
rspec ./spec/components/site_settings/defaults_provider_spec.rb:94 # SiteSettings::DefaultsProvider expose default cache according to locale .set_regardless_of_locale raises when the setting does not exists
rspec ./spec/components/site_settings/defaults_provider_spec.rb:77 # SiteSettings::DefaultsProvider expose default cache according to locale .set_regardless_of_locale sets the default value to a site setting regardless the locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:84 # SiteSettings::DefaultsProvider expose default cache according to locale .set_regardless_of_locale handles the string
rspec ./spec/components/site_settings/defaults_provider_spec.rb:108 # SiteSettings::DefaultsProvider expose default cache according to locale .each yields the pair of site settings
rspec ./spec/components/site_settings/defaults_provider_spec.rb:50 # SiteSettings::DefaultsProvider expose default cache according to locale .all returns all values according to the current locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:185 # SiteSettings::DefaultsProvider.locale_setting_hash returns the hash for client display
rspec ./spec/components/site_settings/defaults_provider_spec.rb:157 # SiteSettings::DefaultsProvider.site_locale= changes and store the current site locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:152 # SiteSettings::DefaultsProvider.site_locale= changes and store the current site locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:162 # SiteSettings::DefaultsProvider.site_locale= don't change when it's shadowed
rspec ./spec/components/site_settings/defaults_provider_spec.rb:178 # SiteSettings::DefaultsProvider.site_locale= doesn't refresh the client when changed
rspec ./spec/components/site_settings/defaults_provider_spec.rb:168 # SiteSettings::DefaultsProvider.site_locale= refresh_site_locale! when called
rspec ./spec/components/site_settings/defaults_provider_spec.rb:173 # SiteSettings::DefaultsProvider.site_locale= refreshes the client when changed
rspec ./spec/components/site_settings/defaults_provider_spec.rb:222 # SiteSettings::DefaultsProvider.refresh_site_locale! loads from GlobalSettings
rspec ./spec/components/site_settings/defaults_provider_spec.rb:213 # SiteSettings::DefaultsProvider.refresh_site_locale! loads the change to locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:229 # SiteSettings::DefaultsProvider.refresh_site_locale! prioritized GlobalSettings than db
rspec ./spec/components/site_settings/defaults_provider_spec.rb:28 # SiteSettings::DefaultsProvider.db_all collects values from db except default locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:35 # SiteSettings::DefaultsProvider.db_all can collect values from db
rspec ./spec/components/site_settings/defaults_provider_spec.rb:22 # SiteSettings::DefaultsProvider inserts default_locale into refresh when initialize
rspec ./spec/components/site_settings/defaults_provider_spec.rb:201 # SiteSettings::DefaultsProvider.load_setting adds a setting to the cache
rspec ./spec/components/site_settings/defaults_provider_spec.rb:206 # SiteSettings::DefaultsProvider.load_setting takes care of locale default
rspec ./spec/components/site_settings/defaults_provider_spec.rb:117 # SiteSettings::DefaultsProvider.site_locale returns the current site locale
rspec ./spec/components/site_settings/defaults_provider_spec.rb:132 # SiteSettings::DefaultsProvider.site_locale when locale is set in the db should load from database
rspec ./spec/components/site_settings/defaults_provider_spec.rb:142 # SiteSettings::DefaultsProvider.site_locale when locale is set in the db ignores blank GlobalSetting
rspec ./spec/components/site_settings/defaults_provider_spec.rb:136 # SiteSettings::DefaultsProvider.site_locale when locale is set in the db prioritizes GlobalSetting than value from db

OK - down to 44 failures. Not great but I suppose I can work with this and hope that the production version is better…

Finished in 16 minutes 44 seconds (files took 13.55 seconds to load)
7464 examples, 44 failures

Failed examples:

rspec ./spec/components/cooked_post_processor_spec.rb:249 # CookedPostProcessor.post_process_images topic image adds a topic image if there's one in the first post
rspec ./spec/components/onebox/engine/discourse_local_onebox_spec.rb:15 # Onebox::Engine::DiscourseLocalOnebox for a link to a post returns a link if post isn't found
rspec ./spec/requests/topics_controller_spec.rb:10 # TopicsController#timings should record the timing
rspec ./spec/components/table_migration_helper_spec.rb:18 # TableMigrationHelper#delayed_drop can drop a table after correct delay and when new table exists
rspec ./spec/controllers/posts_controller_spec.rb:389 # PostsController edit a post when logged in as a regular user extracts links from the new body
rspec ./spec/models/notification_spec.rb:218 # Notification mark_posts_read marks multiple posts as read if needed
rspec ./spec/models/topic_user_spec.rb:356 # TopicUser can scope by tracking
rspec ./spec/models/topic_spec.rb:1556 # Topic#listable_count_per_day collect closed interval listable topics count
rspec ./spec/models/topic_spec.rb:1959 # Topic#with_no_response returns 1 with one topic that doesn't have regular replies
rspec ./spec/models/topic_spec.rb:1925 # Topic#with_no_response returns nothing with no topics
rspec ./spec/models/topic_spec.rb:1951 # Topic#with_no_response returns 0 with a topic with 1 reply
rspec ./spec/models/topic_spec.rb:1936 # Topic#with_no_response returns 1 with one topic that has no replies and author was changed on first post
rspec ./spec/models/topic_spec.rb:1943 # Topic#with_no_response returns 1 with one topic that has a reply by the first poster
rspec ./spec/models/topic_spec.rb:1929 # Topic#with_no_response returns 1 with one topic that has no replies
rspec ./spec/models/topic_spec.rb:1132 # Topic scopes #by_most_recently_created returns topics ordered by created_at desc, id desc
rspec ./spec/components/search_spec.rb:102 # Search escapes non alphanumeric characters
rspec ./spec/components/search_spec.rb:783 # Search Advanced search correctly handles #symbol when no tag or category match
rspec ./spec/components/search_spec.rb:724 # Search Advanced search can order by topic creation
rspec ./spec/components/search_spec.rb:608 # Search Advanced search supports before and after, in:first, user:, @username
rspec ./spec/components/search_spec.rb:666 # Search Advanced search can find by status
rspec ./spec/components/topic_query_spec.rb:336 # TopicQuery a bunch of topics list_latest sort_order returns the topics in correct order
rspec ./spec/components/topic_query_spec.rb:14 # TopicQuery secure category filters categories out correctly
rspec ./spec/models/user_profile_spec.rb:117 # UserProfile bio excerpt emojis supports emoji images
rspec ./spec/models/post_spec.rb:754 # Post sort_order regular topic defaults to created order
rspec ./spec/models/post_spec.rb:740 # Post summary returns the OP and posts above the threshold in summary mode
rspec ./spec/controllers/topics_controller_spec.rb:1266 # TopicsController feature_stats works
rspec ./spec/models/top_topic_spec.rb:38 # TopTopic refresh! after calculating should have top topics
rspec ./spec/components/wizard/step_updater_spec.rb:41 # Wizard::StepUpdater updates the introduction step
rspec ./spec/jobs/fix_primary_emails_for_staged_users_spec.rb:4 # Jobs::FixPrimaryEmailsForStagedUsers should clean up duplicated staged users
rspec ./spec/components/admin_user_index_query_spec.rb:127 # AdminUserIndexQuery correct order with nil values shows nil values first with asc
rspec ./spec/components/column_dropper_spec.rb:17 # ColumnDropper can correctly drop columns after correct delay
rspec ./spec/components/column_dropper_spec.rb:75 # ColumnDropper.mark_readonly should be droppable
rspec ./spec/models/report_spec.rb:128 # Report private messages topic report).to not include private messages
rspec ./spec/models/report_spec.rb:136 # Report private messages post report).to not include private messages
rspec ./spec/models/report_spec.rb[1:4:1:1] # Report post report no posts returns an empty report
rspec ./spec/models/report_spec.rb[1:4:2:3] # Report post report with posts returns total data
rspec ./spec/models/report_spec.rb[1:3:2:3] # Report topic report with topics returns total data
rspec ./spec/models/report_spec.rb[1:3:1:1] # Report topic report no topics returns an empty report
rspec ./spec/models/report_spec.rb:211 # Report posts counts only counts regular posts
rspec ./spec/components/suggested_topics_builder_spec.rb:91 # SuggestedTopicsBuilder adding results adding topics that are not open adds archived and closed, but not invisible topics
rspec ./spec/components/suggested_topics_builder_spec.rb:76 # SuggestedTopicsBuilder adding results adding topics added the result correctly
rspec ./spec/components/suggested_topics_builder_spec.rb:101 # SuggestedTopicsBuilder adding results category definition topics doesn't add a category definition topic
rspec ./spec/components/post_creator_spec.rb:165 # PostCreator new topic success extracts links from the post
rspec ./spec/components/post_creator_spec.rb:543 # PostCreator existing topic success create correctly

Randomized with seed 49662

Did you run “RAILS_ENV=test rake db:create db:migrate”?

@zogstrip - I did yes.

@zogstrip - I do have optipng and one other image utility which are older versions due to ubuntu 14.04 - so maybe they are the cause of the last few errors?

ARN: optipng 0.6.4 at /usr/bin/optipng (< 0.7) does not support -strip option

I’d need to see the backtrace of these errors to tell you more.

OK - how would I get more information to you? is there something specific I can run?

When running bundle exec rspec, there should be backtraces for every errors.

@zogstrip Ok will post output below… This is an absolute beast but I’ll post all of it for completeness… :face_with_raised_eyebrow:

I didn’t think anything in that list of errors looked too bad, but I’ve been using the site and its actually very broken. Can’t post topics, can’t edit posts and now doesn’t want to clear the screen of the “reason for edit” and “create a new topic” overlays, even after restarting the rails server.

the other errors I was getting after running migrations etc:

WARN: optipng 0.6.4 at /usr/bin/optipng (< 0.7) does not support -strip option
WARN: gifsicle 1.78 at /usr/bin/gifsicle (< 1.85) does not support removing extension blocks

Don’t post 400kb of text here with bad formatting, it’s abusive. Post it on an external pasting site and link to it. Previous posts were removed, as they were far too big.

2 Likes

OK @zogstrip the output from rspec can be seen in a more sensible form here: [Ruby] rspec-output-discourse - Pastebin.com - apologies again for the code spew in the last few posts…

2 Likes

No problem thanks for fixing it :+1:

1 Like

Right,

I decided to nuke everything and start from scratch. For some reason running:

bundle exec rake autospec

at the end still resulted in the tests failing completely.

So ran:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get -y install nodejs
sudo npm install -g svgo

as advised in one of the comments, here - Beginners Guide to Install Discourse on Ubuntu for Development (I had done this previously as well)

Next ran:

RAILS_ENV=test rake db:drop db:create db:migrate

then

bundle exec rake autospec

Now all tests pass!

I feel like I didn’t do anything differently this time, so I’m annoyed as I don’t know what fixed this… Bottom line is I’m now up and running so, I won’t look a gift horse in the mouth.

5 Likes

Installing the packages is what was different. That’s all.

@riking I don’t think so as I had all those packages installed previously… Maybe installing some of them after the initial attempt borked something somewhere? Either way it works now, so I’m fine with that!