Fixing a "config.handlebars" undefined method error

I’m trying to run Discourse 1.4.5 in a dev environment. When I go to run bin/rake db:create db:migrate, it crashes with:

rake aborted!
NoMethodError: undefined method `handlebars' for #<Rails::Application::Configuration:0x000000032c50a8>
/opt/app/.bundle/ruby/2.1.0/gems/railties-4.1.10/lib/rails/railtie/configuration.rb:95:in `method_missing'
/opt/app/config/application.rb:140:in `<class:Application>'
/opt/app/config/application.rb:19:in `<module:Discourse>'
/opt/app/config/application.rb:18:in `<top (required)>'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:247:in `block in require'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:247:in `require'
/opt/app/Rakefile:5:in `<top (required)>'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:241:in `load'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:241:in `block in load'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/app/.bundle/ruby/2.1.0/gems/activesupport-4.1.10/lib/active_support/dependencies.rb:241:in `load'
(See full trace by running task with --trace)

I’m not a Ruby developer per se, so much of the Gem/bundler specifics are lost on me. Any ideas on how to debug or fix this? I’ve tried explicitly adding a require for ember/handlebars/template in config/boot.rb, but no avail.

In general we don’t do dev on old releases, is there a reason you are setting up a dev environment for stable?

Its possible one of the security backports broke the dev mode, try rolling them back to see if that is the case.

1 Like

I’m trying to package Discourse as a Sandstorm app, which is why I picked stable.

When you say security backports, do you mean in Discourse or in its dependencies?

EDIT: I ran git checkout v1.4.0 and attempted running again, but still hit the same issue.

Hi @zombiezen, did you solve the problem? If so, how?

Never did. I gave up on packaging Discourse.