Skip to content

Adds environment to open data export task to avoid errors#4742

Merged
oriolgual merged 1 commit intodecidim:masterfrom
podemos-info:fix/open_data_export
Jan 10, 2019
Merged

Adds environment to open data export task to avoid errors#4742
oriolgual merged 1 commit intodecidim:masterfrom
podemos-info:fix/open_data_export

Conversation

@leio10
Copy link
Copy Markdown
Contributor

@leio10 leio10 commented Jan 10, 2019

🎩 What? Why?

When running the open data export task, I receive the following error, that can be fixed adding the environment to the task:

$ RAILS_ENV=production bundle exec rails decidim:open_data:export
from (path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap.rb:22:in `setup': The 'disable_trace' method is not allowed with this Ruby version. current: 2.5.1, allowed version: < 2.5.0
rails aborted!
NameError: uninitialized constant Decidim::Organization
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `block in load_missing_constant'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:74:in `rescue in load_missing_constant'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:56:in `load_missing_constant'
(path)/bundle/ruby/2.5.0/gems/decidim-core-0.16.0/lib/tasks/decidim_open_data_tasks.rake:7:in `block (3 levels) in <top (required)>'
(path)/bundle/ruby/2.5.0/gems/airbrake-7.4.0/lib/airbrake/rake.rb:17:in `execute'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<top (required)>'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
bin/rails:4:in `<main>'

Caused by:
NameError: uninitialized constant Decidim::Organization
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
(path)/bundle/ruby/2.5.0/gems/decidim-core-0.16.0/lib/tasks/decidim_open_data_tasks.rake:7:in `block (3 levels) in <top (required)>'
(path)/bundle/ruby/2.5.0/gems/airbrake-7.4.0/lib/airbrake/rake.rb:17:in `execute'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
(path)/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<top (required)>'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
(path)/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => decidim:open_data:export
(See full trace by running task with --trace)

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry

📷 Screenshots (optional)

@ghost ghost assigned leio10 Jan 10, 2019
@ghost ghost added the status: WIP label Jan 10, 2019
@oriolgual oriolgual merged commit 8b40431 into decidim:master Jan 10, 2019
@leio10 leio10 deleted the fix/open_data_export branch January 10, 2019 11:44
@leio10
Copy link
Copy Markdown
Contributor Author

leio10 commented Jan 10, 2019

Thanks @oriolgual, should we backport this?

@oriolgual
Copy link
Copy Markdown
Contributor

Yes please, to 0.16-stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants