A user is seeking help to install a stable version of Discourse (2.6) locally using Docker, as their current setup is on 2.7.0.beta9. They are experiencing issues after checking out the 2.6.6 tag, including errors related to cache cleaning and database migration. pfaffman suggests using git checkout and running ./bin/rake db:drop db:create db:migrate, but the user encounters a PG::ConnectionBad error, indicating the database server is not running. The user also asks about the possibility of a fully containerized Discourse setup without local dependencies like ember-cli and yarn, as they want to share the environment easily with colleagues.
The only issue I have is that I need to be able to test run a stable version of Discourse (2.6) so that I can run some tests. What’s currently installed is: 2.7.0.beta9
Throughout the installation process above, what is it that I need to change so that I install the stable version of Discourse?
You should be able to cd into the source directory and use git to checkout the version you want. You’ll need to drop, create, and migrate the database.
Hi @pfaffman thanks for that, I was able to get the tag for 2.6.6.
I am running into this error:
WARNING: It looks like your discourse plugins or core version have recently changed.
The tmp/cache directory will be wiped to avoid development issues.
Traceback (most recent call last):
1: from bin/unicorn:63:in `<main>'
bin/unicorn:31:in `ensure_cache_clean!': uninitialized constant FileUtils (NameError)
Did you mean? FileTest
How do I ensure the cache clean so I can proceed?
EDIT:
When I tried to re-init it, this is what I got:
Migrating database...
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/src/lib/migration/safe_migrate.rb:56:in `migrate'
/src/lib/tasks/db.rake:215:in `block in <main>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Sorry @pfaffman, I’m quite new to this so my questions might be quite basic. I didn’t have any essential information on the current database so I didn’t think I needed to migrate it, after I
git checkout v2.6.6
I attempted to re-initalize it, so I got the errors above. How do I go about dropping and creating the database? I attempted the Notes from the guide: Install Discourse for development using Docker but none of them worked for me
I am trying to come up with a local environment within Docker to test and play with plugins as well as explore the API. Also was hoping everything would be in Docker so it can be easily shared with colleagues but it seems like ember-cli & yarn are run locally. Is there a fully packaged Docker container of Discourse at all that doesn’t use anything locally?
After attempting ./bin/rake db:drop db:create db:migrate
I ran into this error:
$ ./bin/rake db:drop db:create db:migrate
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Tasks: TOP => db:drop => db:load_config => environment
I was able to run everything on the beta version but since downgrading it seems like I’m having trouble with the database part