Master branch giving blank page for dev

AI-generated summary

AhmadF.Cheema reported encountering a completely blank page when accessing the master branch of Discourse via a Vagrant development installation on localhost:4000. The browser console displayed errors indicating missing modules such as discourse/lib/raw-handlebars and discourse/widgets/post-cooked, alongside an Ember routing error. These issues arose after updating RubyGems, attempting to resolve pending database migrations, and experimenting with PostgreSQL versions, while the stable branch continued to function correctly. sam inquired about the Ruby version, which AhmadF.Cheema confirmed was Ruby 2.3.1 within the Vagrant environment. tgxworld suggested removing the tmp directory within the Discourse folder as a potential fix. Following this advice, AhmadF.Cheema confirmed that the issue was resolved. Although the solution worked, the user sought an explanation for how stale temporary files could cause specific Ember and Handlebars module errors.

Have been using developer vagrant installation of Discourse (as detailed in Discourse as Your First Rails App), but recently I have been getting a completely blank page on browsing to localhost:4000 for the master branch of discourse. The F12 errors, Chrome is throwing out, are the following:

Uncaught Error: Could not find module discourse/lib/raw-handlebars
Uncaught Error: Could not find module `discourse/widgets/post-cooked` imported from `discourse/lib/plugin-api`
Uncaught TypeError: Cannot read property 'startRouting' of undefined (ember:3477 )

The relevant actions that I performed on my system since the last time the dev installation was working correctly were:

  • Using an updated version of rubygems v2.2.5
  • At some point I noticed getting the “Migrations are pending bin/rake db:migrate RAILS_ENV=development” error on localhost:4000. Tried the solution mentioned here, after which I started getting the blank page.
  • Installed (and later uninstalled) PostgreSQL-9.6.0 on Windows.

The previous branches (like stable (23rd September)) works fine. What could be the issue here?

are you running Ruby 2.3 ?

The ruby-v command in vagrant ssh is showing: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux].
Although, outside of vagrant I have Ruby v2.1, but I suppose this should be irrelevant?

In your Discourse directory, try removing the tmp directory.

Yes, that solved the issue. Thanks for that, much appreciated.
The handlebars, ember errors in Chrome confused me. If it isn’t too much trouble, any explanation to how tmp files could be throwing out ember errors?