Install on macOS – Failure: Scheduler::Defer can pause and resume

I’ve been following the Beginners Guide to Install Discourse on macOS for Development. Unfortunately, I run into a failure running the specs using:

bundle exec rake autospec
Failures:

  1) Scheduler::Defer can pause and resume
     Failure/Error: @reactor&.stop
     
     ThreadError:
       killed thread
     # /Users/js/.rvm/gems/ruby-2.2.1/gems/message_bus-2.2.3/lib/message_bus/timer_thread.rb:48:in `wakeup'
     # /Users/js/.rvm/gems/ruby-2.2.1/gems/message_bus-2.2.3/lib/message_bus/timer_thread.rb:48:in `block in stop'
     # /Users/js/.rvm/gems/ruby-2.2.1/gems/message_bus-2.2.3/lib/message_bus/timer_thread.rb:46:in `synchronize'
     # /Users/js/.rvm/gems/ruby-2.2.1/gems/message_bus-2.2.3/lib/message_bus/timer_thread.rb:46:in `stop'
     # ./lib/scheduler/defer.rb:56:in `stop!'
     # ./spec/components/scheduler/defer_spec.rb:44:in `block (2 levels) in <main>'

Finished in 9 minutes 53 seconds (files took 25.84 seconds to load)
6460 examples, 1 failure, 4 pending

Failed examples:

rspec ./spec/components/scheduler/defer_spec.rb:67 # Scheduler::Defer can pause and resume

Initially, I had a few issues with installing the dependencies running the install script of the guide. Though I think they should be all solved now.

How can I fix this issue?

Thanks!

Purpose of the local installation
In case this is relevant: I’m trying to migrate from a Google Group to a hosted version of Discourse using this guide. The idea is to set up a local version do the migration locally and then upload the backup to the hosted version as I don’t have root access to the hosted version.

That guide assumes you are using a Docker based setup. You should be able to install Docker on macOS and follow then follow every step in that guide.

1 Like

Thanks, @gerhard.

The Discourse support mentioned that macOS guide as an option in an email. But they also pointed me to the Beginners Guide to Install Discourse for Development using Docker. I basically just want to get the job done the quickest way. Just checked DigitialOcean pricing as well and it seems much more affordable then I expected.

What do you recommend as the quickest/easiest way?

Thanks!

1 Like

DigitalOcean probably is the easiest if you are having trouble installing Docker on macOS. It works and is quite cheap considering that you need the droplet only for a short amount of time.

4 Likes

Thanks.

I’ve now tried using both options for macOS on the guide but ran into issues. I’ve left a comment under the guide but eventually gave up. Will try DigitalOcean next.

1 Like

That Ruby is way too old. You may want to try using the latest one.

4 Likes

Thanks. That’s interesting though. The install script from the guide specifically installs 2.6.5. I’ve got no idea why 2.2.1 shows.

When I manually do rbenv install 2.6.5 (as the install script does) this is printed:

rbenv: /Users/js/.rbenv/versions/2.6.5 already exists

ruby -v on the other hand prints:

ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin17]

I figured the logs show that rvm is used. So rvm list prints:

=* ruby-2.2.1 [ x86_64 ]
   ruby-2.5.0 [ x86_64 ]

So I did rvm install "ruby-2.6.5" and tried bundle exec rake autospec again. It now prints:

Traceback (most recent call last):

2: from /Users/js/.rvm/rubies/ruby-2.6.5/bin/bundle:23:in `<main>'

1: from /Users/js/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'

/Users/js/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.1) required by your /Users/js/Documents/Aktuelle-Projekte/Openframe/discourse/Gemfile.lock. (Gem::GemNotFoundException)

To update to the latest version installed on your system, run `bundle update --bundler`.

To install the missing version, run `gem install bundler:2.1.1`

… seems like I you shouldn’t touch the rvm version? Or am I missing something?

… got it up and running on Digital Ocean in the meantime. All other methods failed for me somehow.

1 Like

Almost certainly not the issue now, but you can use rvm use to specify the Ruby version.

rvm use 2.6.5 --default

1 Like