Then to start developing, let's say today I am working on my container-names plugin, I just cd into the plugins directory and start Visual Studio Code:
and normally I open a web browser to discourse on github and search the discourse repo code for examples to follow in the areas I want to code:
Hope this helps.
Any questions, please ask!
I would be happy to see people here develop plugins for discourse (and not just talk about it and promise me they will do it, and never do it ....)
Discourse is free and open source. Why not develop a plugin? I have developed two admin utilities so far and heavily modified one ad serving plugin to work with Revive Ad server. If I can do it, you can too!
These days I fired up my Discourse dev environment on macOS even easier:
#login to the mac after booting
cd discourse. # /Users/Tim/discourse
export GEM_HOME=/Users/Tim/bin
export GEM_PATH=/Users/Tim/bin
export RAILS_ENV=development
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init - --no-rehash)"
and then fire up rails
bundle exec 'rails s'
no need, generally speaking, to start unicorn.
the go to:
http://localhost:3000
Thats pretty much it.
Then, open another terminal
cd /Users/Tim/discourse/plugins/plugin-dev-of-the-day
code .
to fire up Visual Studio code.
When changes to the plugin only effect Ruby files, just kill and restart rails server;
#control c the bundle exec 'rails s' process
bundle exec 'rails s' process
when a change to the code effects javascript or changes to the Ruby files require Discourse cache clearing, do this before restarting rails server:
rm -rf /Users/Tim/discourse/tmp/cache
That's it.
When I want to enter the rails console, I open another terminal and do this: