AlchemyCMS/alchemy_i18n

Generator relies on webpacker

gr8bit opened this issue · 2 comments

When using rails g alchemy_i18n:install --locales=en to install a locale, the following error occurs:

/usr/local/rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/psych.rb:670:in `initialize': No such file or directory @ rb_sysopen - /home/app/webapp/config/webpacker.yml (Errno::ENOENT)
	from /usr/local/rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/psych.rb:670:in `open'
	from /usr/local/rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/psych.rb:670:in `load_file'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/alchemy_i18n-3.1.0/lib/generators/alchemy_i18n/install/install_generator.rb:41:in `append_pack'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:134:in `block in invoke_all'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:134:in `each'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:134:in `map'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:134:in `invoke_all'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/group.rb:232:in `dispatch'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/railties-7.0.5/lib/rails/generators.rb:263:in `invoke'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/railties-7.0.5/lib/rails/commands/generate/generate_command.rb:26:in `perform'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/railties-7.0.5/lib/rails/command/base.rb:87:in `perform'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/railties-7.0.5/lib/rails/command.rb:48:in `invoke'
	from /usr/local/rvm/gems/ruby-3.2.0/gems/railties-7.0.5/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

It seems the alchemy I18n gem relies on webpacker to be present, which is not necessarily the case in a Rails 7 app.

This should be solved in #49. Could you please release a new version @tvdeyen ?