Project

General

Profile

Actions

Defect #33777

closed

No anymore yaml_db rake tasks db:data:dump/db:data:load after update redmine from 4.0.x to 4.1.1

Added by VVD VVD over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I don't know the exact reason, but after upgrade redmine from 4.0.x to 4.1.1 there are no yaml_db db:data:dump and db:data:load in rake --tasks.

Redmine version                4.1.1.stable.19936

# uname -rms
FreeBSD 12.1-RELEASE-p7 amd64
# ruby --version
ruby 2.6.6p146 (2020-03-31 revision 67876) [amd64-freebsd12]

# gem list

*** LOCAL GEMS ***

actioncable (5.2.4.3)
actionmailer (5.2.4.3)
actionpack (5.2.4.3)
actionpack-xml_parser (2.0.1)
actionview (5.2.4.3)
active_record_union (1.3.0)
activejob (5.2.4.3)
activemodel (5.2.4.3)
activemodel-serializers-xml (1.0.2)
activerecord (5.2.4.3)
activestorage (5.2.4.3)
activesupport (5.2.4.3)
acts_as_list (1.0.1)
addressable (2.7.0)
arel (9.0.0)
asciidoctor (2.0.10)
ast (2.4.1)
builder (3.2.4)
bundle (0.0.1)
bundler (2.1.4)
capybara (3.33.0)
childprocess (3.0.0)
concurrent-ruby (1.1.6)
crass (1.0.6)
css_parser (1.7.1)
csv (3.1.6)
dalli (2.7.10)
docile (1.3.2)
erubi (1.9.0)
etc (1.1.0)
globalid (0.4.2)
htmlentities (4.3.4)
i18n (1.8.5)
jaro_winkler (1.5.4)
json (2.3.0)
loofah (2.6.0)
mail (2.7.1)
marcel (0.3.3)
metaclass (0.0.4)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
mocha (1.11.2)
mysql2 (0.5.2)
net-ldap (0.16.2)
nio4r (2.5.2)
nokogiri (1.10.10)
ox (2.13.2)
parallel (1.19.2)
parser (2.7.1.4)
passenger (6.0.6)
pg (1.2.3)
public_suffix (4.0.5)
puma (4.3.5)
rack (2.2.3)
rack-openid (1.4.2)
rack-test (1.1.0)
rails (5.2.4.3)
rails-controller-testing (1.0.5)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.3.0)
railties (5.2.4.3)
rainbow (3.0.0)
rake (13.0.1, 12.3.3)
rbpdf (1.20.1)
rbpdf-font (1.19.1)
rdoc (6.1.2)
redcarpet (3.5.0)
redmine_extensions (0.3.11)
regexp_parser (1.7.1)
request_store (1.5.0)
rexml (3.2.4)
roadie (4.0.0)
roadie-rails (2.1.1)
rouge (3.21.0)
rubocop (0.88.0)
rubocop-ast (0.2.0)
rubocop-performance (1.7.1)
rubocop-rails (2.7.1)
ruby-openid (2.9.2)
ruby-progressbar (1.10.1)
rubyzip (2.3.0)
selenium-webdriver (3.142.7)
simple_enum (2.3.2)
simplecov (0.18.5)
simplecov-html (0.12.2)
sprockets (3.7.2)
sprockets-rails (3.2.1)
stringio (0.1.3)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
unicode-display_width (1.7.0)
uuidtools (2.2.0)
websocket-driver (0.7.3)
websocket-extensions (0.1.5)
xpath (3.2.0)
yaml_db (0.7.0)
yard (0.9.25)
zeitwerk (2.2.2)
zip-zip (0.3)

# cd "/path/to/redmine/" 
# rake --tasks
rake about                                         # List versions of all Rails frameworks and...
rake active_storage:install                        # Copy over the migration needed to the app...
rake app:template                                  # Applies the template supplied by LOCATION...
rake app:update                                    # Update configs and some other initially g...
rake cache_digests:dependencies                    # Lookup first-level dependencies for TEMPL...
rake cache_digests:nested_dependencies             # Lookup nested dependencies for TEMPLATE (...
rake ci                                            # Run the Continuous Integration tests for ...
rake ci:about                                      # Display info about the build environment
rake ci:build                                      # Build Redmine
rake ci:setup                                      # Setup Redmine for a new build
rake ci:teardown                                   # Finish the build
rake config/database.yml                           # Creates database.yml for the CI server
rake config/initializers/secret_token.rb           # Generates a secret token for the application
rake db:create                                     # Creates the database from DATABASE_URL or...
rake db:decrypt                                    # Decrypts SCM and LDAP passwords in the da...
rake db:drop                                       # Drops the database from DATABASE_URL or c...
rake db:encrypt                                    # Encrypts SCM and LDAP passwords in the da...
rake db:environment:set                            # Set the environment value for the database
rake db:fixtures:load                              # Loads fixtures into the current environme...
rake db:migrate                                    # Migrate the database (options: VERSION=x,...
rake db:migrate:status                             # Display status of migrations
rake db:rollback                                   # Rolls the schema back to the previous ver...
rake db:schema:cache:clear                         # Clears a db/schema_cache.yml file
rake db:schema:cache:dump                          # Creates a db/schema_cache.yml file
rake db:schema:dump                                # Creates a db/schema.rb file that is porta...
rake db:schema:load                                # Loads a schema.rb file into the database
rake db:seed                                       # Loads the seed data from db/seeds.rb
rake db:setup                                      # Creates the database, loads the schema, a...
rake db:structure:dump                             # Dumps the database structure to db/struct...
rake db:structure:load                             # Recreates the databases from the structur...
rake db:version                                    # Retrieves the current schema version number
rake dev:cache                                     # Toggle development mode caching on/off
rake extract_fixtures                              # Create YAML test fixtures from data in an...
rake generate_secret_token                         # Generates a secret token for the application
rake initializers                                  # Print out all defined initializers in the...
rake locales                                       # Updates and checks locales against en.yml
rake locales:add_key                               # Adds a new top-level translation string t...
rake locales:check_interpolation                   # Checks interpolation arguments in locals ...
rake locales:check_parsing_by_psych                # Check parsing yaml by psych library on Ru...
rake locales:dup                                   # Duplicates a key
rake locales:remove_key                            # Removes a translation string from all loc...
rake locales:update                                # Updates language files based on en.yml co...
rake log:clear                                     # Truncates all/specified *.log files in lo...
rake middleware                                    # Prints out your Rack middleware stack
rake notes                                         # Enumerate all annotations (use notes:opti...
rake notes:custom                                  # Enumerate a custom annotation, specify wi...
rake redmine:attachments:move_to_subdirectories    # Moves attachments stored at the root of t...
rake redmine:attachments:prune                     # Removes uploaded files left unattached af...
rake redmine:attachments:update_digests            # Updates attachment digests to SHA256
rake redmine:dmsf_alert_approvals                  # Alert all users who are expected to do an...
rake redmine:dmsf_convert_documents                # Convert project documents to DMSF folder/...
rake redmine:dmsf_create_digests                   # DMSF maintenance task
rake redmine:dmsf_maintenance                      # DMSF maintenance task
rake redmine:email:read                            # Read an email from standard input
rake redmine:email:receive_imap                    # Read emails from an IMAP server
rake redmine:email:receive_pop3                    # Read emails from an POP3 server
rake redmine:email:test[login]                     # Send a test email to the user with the pr...
rake redmine:fetch_changesets                      # Fetch changesets from the repositories
rake redmine:load_default_data                     # Load Redmine default configuration data
rake redmine:migrate_dbms                          # FOR EXPERIMENTAL USE ONLY, Moves Redmine ...
rake redmine:migrate_from_mantis                   # Mantis migration script
rake redmine:migrate_from_trac                     # Trac migration script
rake redmine:permissions                           # List all permissions and the actions regi...
rake redmine:plugins                               # Migrates and copies plugins assets
rake redmine:plugins:assets                        # Copies plugins assets into the public dir...
rake redmine:plugins:migrate                       # Migrates installed plugins
rake redmine:plugins:test                          # Runs the plugins tests
rake redmine:plugins:test:functionals              # Runs the plugins functional tests
rake redmine:plugins:test:integration              # Runs the plugins integration tests
rake redmine:plugins:test:system                   # Runs the plugins system tests
rake redmine:plugins:test:ui                       # Runs the plugins ui tests
rake redmine:plugins:test:units                    # Runs the plugins unit tests
rake redmine:send_reminders                        # Send reminders about issues due in the ne...
rake redmine:tokens:prune                          # Removes expired tokens
rake redmine:watchers:prune                        # Removes watchers from what they can no lo...
rake redmine_extensions_engine:install:migrations  # Copy migrations from redmine_extensions_e...
rake restart                                       # Restart app by touching tmp/restart.txt
rake routes                                        # Print out all defined routes in match ord...
rake secret                                        # Generate a cryptographically secure secre...
rake stats                                         # Report code statistics (KLOCs, etc) from ...
rake test                                          # Runs all tests in test folder except syst...
rake test:coverage                                 # Measures test coverage
rake test:db                                       # Run tests quickly, but also reset db
rake test:routing                                  # Run the routing tests
rake test:scm                                      # Run unit and functional scm tests
rake test:scm:functionals                          # Run the scm functional tests
rake test:scm:setup:all                            # Creates all test repositories
rake test:scm:setup:bazaar                         # Creates a test bazaar repository
rake test:scm:setup:create_dir                     # Creates directory for test repositories
rake test:scm:setup:cvs                            # Creates a test cvs repository
rake test:scm:setup:filesystem                     # Creates a test filesystem repository
rake test:scm:setup:git                            # Creates a test git repository
rake test:scm:setup:mercurial                      # Creates a test mercurial repository
rake test:scm:setup:subversion                     # Creates a test subversion repository
rake test:scm:units                                # Run the scm unit tests
rake test:scm:update                               # Updates installed test repositories
rake test:system                                   # Run system tests only
rake time:zones[country_or_offset]                 # List all time zones, list by two-letter c...
rake tmp:clear                                     # Clear cache, socket and screenshot files ...
rake tmp:create                                    # Creates tmp directories for cache, socket...
rake yard                                          # Generate YARD Documentation
rake yarn:install                                  # Install all JavaScript dependencies as sp...

yaml_db bugreport is here: https://github.com/yamldb/yaml_db/issues/140

P.S. Don't know correct Category.

Actions #1

Updated by VVD VVD over 4 years ago

Please, fix:

yaml_db bugreport is here: https://github.com/yamldb/yaml_db/issues/141

Actions #2

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

yaml_db is a third-party plugin, not a part of Redmine. Please contact the author of the plugin.

Actions #3

Updated by VVD VVD over 4 years ago

  • Status changed from Closed to Reopened

Go MAEDA wrote:

yaml_db is a third-party plugin, not a part of Redmine. Please contact the author of the plugin.

Did you read my message?
I wrote that I don't know is it Redmine bug or yaml_db or something else and show link on yaml_db's bugreport.
It work fine with Redmine 4.0, but doesn't work with 4.1.1 - something changed in Redmine or/and gems.
Maybe it's rails bug, but if all upstreams begin to close bugs with "Invalid" and "XXX is a third-party plugin, not a part of YYY. Please contact the author of the plugin." - how to solve it?

P.S. yaml_db isn't Redmine plugin, it's a gem:

YamlDb is a database-independent format for dumping and restoring data.
It complements the database-independent schema format found in db/schema.rb.
The data is saved into db/data.yml.
Any database that has an ActiveRecord adapter should work.
This gem supports Rails versions 3.0 through 5.2.

Actions #4

Updated by VVD VVD over 4 years ago

Plz, help to find where is the bug.

Actions #5

Updated by VVD VVD over 4 years ago

Just tested on CentOS Linux release 7.8.2003 (Core) with same version of the Redmine 4.1.1.

# ruby --version
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux]

No db:data:dump and db:data:load too.

Actions #6

Updated by Holger Just over 4 years ago

  • Status changed from Reopened to Closed

yaml_db is not a dependency of Redmine itself and is thus neither shipped with nor required by Redmine.

If you were able to use the rake tasks with your older Redmine version before, you (or someone else who has setup your Redmine) might have added the yaml_db dependency manually, e.g. by adding a Gemfile.local file or by manually adding the Gemfile shipped with Redmine.

In your updated Redmine, you can re-add yaml_db by editing (or creating of it's missing) the Gemfile.local file in the same directory as the shipped Gemfile and add the following content there:

gem "yaml_db" 
Actions #7

Updated by VVD VVD over 4 years ago

  • Status changed from Closed to Reopened

I never said that Redmine depends on yaml_db.
Spend, please, 1 minute to read that is yaml_db and what is it used for:

This can be used as a replacement for mysqldump or pg_dump, but only for the databases typically used by Rails apps.
Users, permissions, schemas, triggers, and other advanced database features are not supported - by design.

For example I used it for migrate from MySQL to PostgreSQL and using it to backup database now.
After update Redmine from 4.0 to 4.1 it stopped working.
I ask developers of Redmine and yaml_db for help to find the reason and to fix it.

Maybe bug in Redmine, maybe in yaml_db, maybe in rails, ruby or in something else, but how to find if all developers close bug reports as "Invalid"?

Actions #8

Updated by Holger Just over 4 years ago

  • Status changed from Reopened to Closed

Please also read what we are telling you.

yaml_db (and its rake tasks) is not part of Redmine and is not shipped with Redmine. As such, there is nothing we can fix here since there is nothing wrong with Redmine as shipped.

The sole reason why the rake tasks are not available in your Redmine 4.1 installation is that Redmine does not require yaml_db by default. To be able to use the rake tasks, you have to add yaml_db as a dependency in your local Redmine installation.

If you used yaml_db in your previous installation, someone has manually added the yaml_db gem to your own installation (which is a custom change which is not part of Redmine). I have explained in my previous reply how you might add the gem dependency to your new Redmine installation. Only after adding the gem dependency in the Gemfile.local and running bundle install, you will be able to use the rake tasks defined by the yaml_db gem.

If you have your previous Redmine 4.0 installation still available, I encourage you to check it how the (non-standard) yaml_db gem was added there. The same approach taken there likely stills works with your Redmine 4.1 installation after you have performed the same change as you had done previously in your Redmine 4.0 installation.

Actions #9

Updated by VVD VVD over 4 years ago

Sorry, my english is so poor that I misundertood your explanation…
Only after read this I understood that you mean:

Only after adding the gem dependency in the Gemfile.local and running bundle install, you will be able to use the rake tasks defined by the yaml_db gem.

Thanks! It work now.

Actions #10

Updated by VVD VVD over 4 years ago

Where are my eyes?
yaml_db have this in README.md:

Simply add to your Gemfile:
gem 'yaml_db'
All rake tasks will then be available to you.

Actions

Also available in: Atom PDF