Tuve un problema con la librería i18n-tasks relacionado a una llave reservada de nombre :default, el asunto es que en las versiones y de la gema i18n tienen una llave con ese nombre y como i18n-tasks también lo utiliza, pues se crea un error.
Tras correr este comando:
bundle exec i18n-tasks add-missing --verbose
Me salió este error:
"warning: parser/current is loading parser/ruby31, which recognizes 3.1.4-compliant syntax, but you are running 3.1.2.Please see ``` failed to load command: i18n-tasks (/Users/your_computer_namea/.rbenv/versions/3.1.2/bin/i18n-tasks)/Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n/backend/base.rb:65:in translate': reserved key :default used in "Value. Interpolates: %{value}, %{human_key}, %{key}, %{default}, %{value_or_human_key}, %{value_or_default_or_human_key}" (I18n::ReservedInterpolationKey) from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:363:in block in translate_key' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:362:in catch' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:362:in translate_key' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:222:in translate' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/command/dsl.rb:46:in block in t' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:188:in try_call' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in block in optparse_args' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in map!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in optparse_args' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:92:in block (2 levels) in optparse_command!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:91:in each' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:91:in block in optparse_command!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/3.1.0/optparse.rb:1102:in initialize' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:90:in new' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:90:in optparse_command!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:80:in optparse!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:73:in parse!' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:50:in block in run' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:322:in with_locale' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:49:in run' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:18:in block in start' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:211:in auto_output_coloring' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:17:in start' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:11:in start' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/bin/i18n-tasks:15:in <top (required)>' from /Users/your_computer_namea/.rbenv/versions/3.1.2/bin/i18n-tasks:25:in load' from /Users/your_computer_namea/.rbenv/versions/3.1.2/bin/i18n-tasks:25:in <top (required)>' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in load' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:58:in kernel_load' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli/exec.rb:23:in run' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli.rb:451:in exec' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/command.rb:28:in run' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor.rb:527:in dispatch' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli.rb:34:in dispatch' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/vendor/thor/lib/thor/base.rb:584:in start' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/cli.rb:28:in start' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/exe/bundle:28:in block in <top (required)>' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' from /Users/your_computer_namea/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.5.9/exe/bundle:20:in <top (required)>' from /Users/your_computer_namea/.rbenv/versions/3.1.2/bin/bundle:25:in load' from /Users/your_computer_namea/.rbenv/versions/3.1.2/bin/bundle:25:in <main>'"``
Lo logré solucionar haciendo varias cosas.
* Haciendo un downgrade de la gema i18n a al versión , pero esta la hice desde el gemfile
* Instalando i18n-tasks desde el gemfile
Para los dos puntos anteriores solo agregué estas líneas en el archivo gemfile
gem 'i18n', '1.14.1'
gem 'i18n-tasks'
y luego corrí el comando bundle install en la terminal
* Verifiqué que el path de i18n-tasks fuera el correcto:
debemos buscar el path de i18n-tasks con el siguiente comando en la terminal bundle show i18n-tasks
Después debemos agregar este path a nuestro archivo de configuración shell (~/.bashrc, ~/.bash_profile, ~/.zshrc, etc.)
export PATH="$PATH:$(bundle show i18n-tasks)/bin"
Una vez que guardes el archivo, debes correr el siguiente comando en la terminal (dependiendo de tu archivo de config. de shell) para que los cambios en este archivo tengan efecto en la terminal sin que la cierres y abras:
source ~/.zshrc
Y listo, eso debería solucionar el problema, toma en cuenta que como instalamos todo con bundler, en el gemfile, deberas poner bundle exec antes de cualquier comando referente a i18n-tasks como bundle exec i18n-tasks add-missing