HOWTO Set up a development environment using vagrant (Ubuntu guide)

The final decision as per @sam is to decline and close the pull request as per here.

As such, this Vagrant branch can be merged over top of any currently existing discourse pull with the following method:

git remote add vagrant-tarek
git merge vagrant-tarek/master

@Sam suggests that we should be using a docker dev environment, so perhaps if you have never done Discourse development on Vagrant, then look at that first and make sure you want this unsupported method if not.

I’d suggest building the vagrant file alongside a script that also pulls and mounts discourse up separately (or as a submodule) - that might make it easier for you to maintain a repository for vagrant-ing your Discourse workflow.

It should be be pretty simple to set up from what you’ve got so far, and that way you wouldn’t have to deal with maintaining a straight up fork.


Thank you for the advice. I’ll look at how to do this more rationally when I have a bit of time for it. In the meantime, I managed to fix my plugin, so glad I was at least able to get the environment going. If nothing else, the familiar Vagrant is ideal for idiots like me who want to drop in very occasionally without learning a new dev setup.


I’ve seen you recommend this several times. Perhaps this topic (and other development topics) should be edited to include this recommendation. I just recommended it to someone and it was hard to find.


I’ll be creating a separate howto topic for the Docker-based development setup in the next few days, thanks for the tip :+1:

EDIT: Here’s the new topic: Beginners Guide to Install Discourse for Development using Docker :wink:


Thank you for doing this. I also took @sam’s advice and figured out docker development. WOW, huge improvement!


Fails at the bundle exec rake step with Discourse requires Ruby 2.5.2 or up. The box is based on Ubuntu 18.04 which has Ruby 2.5.1.


I recommend using the docker setup, closing this topic, vagrant setup is unmaintained and broken