Unable to install Data Explorer Plugin last version

Hello,

I am stuck at this point for some days if anyone can help !

When i want to install Data Explorer latest version on my Discourse instance, i am getting the error below :

NameError: uninitialized constant BaseBookmarkable
/opt/bitnami/discourse/plugins/discourse-data-explorer/lib/data_explorer_query_group_bookmarkable.rb:3:in `<main>'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/opt/bitnami/discourse/plugins/discourse-data-explorer/plugin.rb:878:in `block in activate!'
/opt/bitnami/discourse/lib/plugin/instance.rb:478:in `block in notify_after_initialize'
/opt/bitnami/discourse/lib/plugin/instance.rb:476:in `each'
/opt/bitnami/discourse/lib/plugin/instance.rb:476:in `notify_after_initialize'
/opt/bitnami/discourse/config/application.rb:364:in `each'
/opt/bitnami/discourse/config/application.rb:364:in `block (2 levels) in <class:Application>'
/opt/bitnami/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/opt/bitnami/discourse/config/application.rb:363:in `block in <class:Application>'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `instance_exec'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:32:in `run'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/initializable.rb:60:in `run_initializers'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:391:in `initialize!'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `public_send'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `method_missing'
/opt/bitnami/discourse/config/environment.rb:7:in `<main>'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:88:in `register'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:367:in `require_environment!'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
/opt/bitnami/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/bitnami/ruby/bin/bundle:25:in `load'
/opt/bitnami/ruby/bin/bundle:25:in `<main>'
Tasks: TOP => environment

I thik this happened after @frank.manuel commits on the new FEATURE: Bookmarkable QueryGroups.

I have tried to reset to an old commit as mentionned on @VladChad answer, this helped to install and activate the plugin but when i go to the path “/admin/plugins/explorer/queries”, i got a new error 500 (log below)

Started GET "/admin/plugins/explorer/queries" for 192.168.50.1 at 2022-09-08 16:16:36 +0000
Processing by DataExplorer::QueryController#index as JSON
Completed 500 Internal Server Error in 17ms (ActiveRecord: 0.0ms | Allocations: 1368)
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "data_explorer_queries" does not exist
LINE 8:  WHERE a.attrelid = '"data_explorer_queries"'::regclass
                            ^
)
app/controllers/application_controller.rb:387:in `block in with_resolved_locale'
app/controllers/application_controller.rb:387:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:361:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'
Failed to handle exception in exception app middleware : PG::UndefinedTable: ERROR:  relation "data_explorer_queries" does not exist
LINE 8:  WHERE a.attrelid = '"data_explorer_queries"'::regclass

Sincerely,

Which version of discourse is specified in your app.yml? Are you running tests-passed?

1 Like

I am using the latest Discourse by Bitnami release 2.8.8-debian-11-r9

I’m afraid we can’t support the bitnami installation here. It’s quite possible that your problem exists because the bitnami build is behind the official releases.

You can reach out to Bitnami for support, but I would recommend taking a backup and switching to the standard install. It’s going to save you a lot of pain in the long run.

4 Likes

The problem was the Data Explorer actual version (main branch) which is not compatible with Discourse 2.8.8 ; I have tried for both standard install and Bitnami install.

Finally, I found a solution to install the plugins on Discourse Bitnami:

cd /opt/bitnami/discourse
sudo RAILS_ENV=production bundle exec rake plugin:install repo=PLUGIN_REPO_URL
...
RAILS_ENV=production LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake themes:update assets:precompile

The last 3 commands are necessary to:

  • Check for plugins compatibility with installed Discourse’s version and pull the last compatible version for each specified plugin
  • Execute database migrations if there are some plugins that require it
  • Update themes and compile assets

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.