Rails importmap:install script fails

I am trying to create a new rails app on Rocky Linux 8. Everything goes fine until I get to:

rails importmap:install

This fails with:

rails importmap:install

internal:/home/xxxxxxx/.rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in `require’: cannot load such file – uby-3.2.2 (LoadError)

Looks like a script problem or a configuration problem on my part.

Ruby 3.2.2 installed in my home directory using ruby-install and chruby used for version selection and configuration.

rails 7.1.2 Gem installed without issue. command used to install new app: rails new --css tailwind --database postgresql

importmap-rails and tailwinds-rails gems are installed and both fail in the same way in the install step. I assume the rails install method is the problem since it is the same for both.

After much searching I have not found a solution

I solved the issue by looking at my Mac configuration and noticed that the string that was being complained about was the same as RUBYOPT. I looked at my Mac and saw that RUBYOPT was empty so I did the same on this server and everything installed. After investigating chruby I found that the u global option I was using caused the issue so I removed that option and the problem was fixed. I went from:

chruby u 3.2.2


chruby 3.2.2

in my .bashrc which fixed the issue

This issue can be closed