Beginners Guide to Install Discourse on macOS for Development


(Yağız Öztürk) #44

No way to get email for activation… Followed all the steps. Started sidekiq also…

Can I do activation with a sql query?

(Arpit Jalan) #45


(Joe Seyfried) #46

Here’s another thing I could not solve although I spent half of the day searching: how do I upgrade a development installation without the nifty admin/upgrade route?

Here are the things I did which I pulled from various pieces of information lying around:

git fetch
git reset --hard HEAD@{upstream}

(tried git pull too, which said that I’m already at the latest version…)

bundle install
bundle exec rake multisite:migrate
bundle exec rake db:migrate db:test:prepare

…and all this still leaves me with a

…although I tried several restartsand bundle exec rake tmp:clear. Is there anything else I have to trigger?

(Jeff Atwood) #47

I don’t think sidekiq runs on development instances does it? @techapj can you comment?

(Joe Seyfried) #48

No, not by default - the “installed” column bugs me (it should be beta9) - or is the information in that table updated by sidekiq?

(Arpit Jalan) #49

@JSey don’t worry about the admin dashboard version, it gets updated via a background job. To make sure you are on latest version, run:

git log

and make sure the latest commit is there.

@codinghorror on development instance, the sidekiq needs to be to started manually via:

bundle exec sidekiq

(Kane York) #50

Here’s the script I use after git pulling:

$ cat projects/discourse/ 

bundle install
pkexec systemctl start postgresql redis-server
bundle exec rake db:migrate
RAILS_ENV=test bundle exec rake db:migrate

(Erick Guan) #51

Can you wikify this topic? Since we can add rake admin:create to this guide.

(Arpit Jalan) #52

Sure, just wikid! :smile:

(Shahryar Tavakkoli) #53

hi after

bundle exec rake autospec

/usr/local/bin/rspec: No such file or directory - convert
/usr/local/bin/rspec: No such file or directory - convert
/usr/local/bin/rspec: No such file or directory - convert

and after start rails server

plz help me

(Sam Saffron) #54

Install image magick on you mac, without it you can not run the spec suite.

(Robin Ward) #55

I believe that means you don’t have ImageMagick installed. @zogstrip could confirm.

(Régis Hanol) #56

I confirm what @eviltrout said about ImageMagick not being (properly) installed.

(Matthew Stingel) #57

The test suite fails if you don’t have redis server running (at-least in my case)! In these instructions it doesn’t seem to include booting it up. Before you run autospec be sure to run redis-server and that should solve your problems.

(Tim) #59

I’m running into trouble on Yosemite … at brew install rbenv-gem-rehash:

Error: No available formula with the name “rbenv-gem-rehash”
==> Searching for similarly named formulae…
Error: No similarly named formulae found.
==> Searching taps…
Error: No formulae found in taps.


I have the same issue as @tjb1013 , hoping someone will help.

(Arpit Jalan) #61

Seems like rbenv-gem-rehash is now deprecated (and included in core rbenv). I removed it from the script.

(Tim) #62

Thanks - more Yosemite trouble - with installing bundler.

ERROR: While executing gem … (Errno::EPERM)
Operation not permitted - /usr/bin/bundle

Resolved with this hint:

No, you’ll need to either change your GEM_HOME or do something like sudo gem install bundler -n /usr/local/bin because of El Cap’s introduction of SIP (System Integrity Protection).

However, similar issue with gem install rails -V - … Ran as sudo but failed with this message:

ERROR: While executing gem … (Errno::EPERM)
Operation not permitted - /usr/bin/rackup

Wasn’t sure if directing that install to a directory made sense given all the is being pulled in …


@tjb1013, did you make it work? or are we both still awaiting some help?


I have problem in testing step (with Mac 10.11.3). After

bundle exec rake autospec

I get an error:

Finished in 0.10304 seconds (files took 5.63 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/models/user_visit_spec.rb:36 # UserVisit#by_day collect closed interval visits

and the test step doesn’t finished.