Discourse fails to rebuild


#1

I have tried so hard to scroll back and look for problems, but it turn out I could found nothing causing this problem, is there any other factors causing this issue?

Here is the log


(David Taylor) #2

Looks like an issue caused by the discourse-plugin-permalink plugin. Try removing it and try again


#3

Do you mind pointing out which line is indicating this? I’m rather curious on what that message is looking like, so that the next time the same thing happens, i know where to fix it


(David Taylor) #4

Sure.

The offending error tends to be near the bottom (but not always), so I start at the bottom of the log. Lines 4835-4848 describe the system shutting down, so we don’t care about them. Immediately above that, we have a Ruby stack trace:

NoMethodError: undefined method `after_after_initialize' for #<Plugin::Instance:0x0055bec4ee59e8>
Did you mean?  after_initialize
/var/www/discourse/plugins/discourse-plugin-permalink/plugin.rb:12:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:403:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:403:in `activate!'
/var/www/discourse/lib/discourse.rb:146:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:143:in `each'
/var/www/discourse/lib/discourse.rb:143:in `activate_plugins!'
/var/www/discourse/config/application.rb:178:in `<class:Application>'
/var/www/discourse/config/application.rb:26:in `<module:Discourse>'
/var/www/discourse/config/application.rb:25:in `<top (required)>'
/var/www/discourse/Rakefile:5:in `require'
/var/www/discourse/Rakefile:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rake-12.1.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)

You can see there that the offending file is in the /plugins/discourse-plugin-permalink directory.

I then tend to do a search on meta (sorted by “latest post”) for the plugin to see if other people are having the same issue. In this case searching for “discourse-plugin-permalink” I found my own post from a few weeks ago:

So it looks like discourse-plugin-permalink needs to be updated before it will work with Rails 5.

Hope that helps :slight_smile:


#5

i tried to disable it, and then it become like this


#6

It wan’t going so great, and i really have no clue on what is causing the problem this time, (at least i can’t fins any trace)


(David Taylor) #7

Yeah, that one’s not quite so clear. It will be caused by one of the plugins you’ve installed. Remove them one-by-one and see whether it’s fixed. Start with the more uncommon ones. If they start with github.com/discourse/ then they’re probably safe.


#8

Actually all of them are from github…


(David Taylor) #9

The important bit is the /discourse after github.com (i.e. they are under the “Discourse” organisation on github). If so, they are plugins supported by the core team, so should be working fine.


#10

I literally commented out all plugins that are not by discourse , and it builds up again, btw, thanks for replying