Production.log give No method error and Discourse not working

Can you share the whole backtrace? This seems to be an old incompatible plugin that needs to be removed.

GitHub - discourse/plugin_discourse_dynamic_sidebar · GitHub is a know broken plugin that causes that error.