How to use Ruby Default Switches?

Hello. Can you tell me how to use Ruby Default Switches in Tumbleweed? This is a mystery to me.
:joy:

Take a look:

alex@localhost:~/.disk_a/Rails/Heroku/crud_blog> ruby -v
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux-gnu]
alex@localhost:~/.disk_a/Rails/Heroku/crud_blog> rails s
=> Booting Puma
=> Rails 6.1.7.2 application starting in development 
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 6.1.0 (ruby 3.1.3-p185) ("The Way Up")
*  Min threads: 5
*  Max threads: 5
*  Environment: development
*          PID: 6621
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2023-02-27 07:57:46 +0300 ===
- Goodbye!
Exiting

Now look here: the Gemfile of this application requires Ruby 3.1.3. And it works! I didn’t know this was possible.

Note. My rails-app work fine, ok. How can I get an analogous result with scripts?

Please, any ideas.

There appears to be language confusion. There is nothing to “use”. All that this link says - default ruby version in Tumbleweed was changed from 3.1 to 3.2.

1 Like

OK. I will reword the question. Ruby 3.2 is default, but rails-app works under Ruby 3.1 (see my first post). How can I get ruby-script to work under Ruby 3.1 instead of Ruby 3.2 ?

Nobody browsing this forum topics is going to notice it. If you have different question, start new topic with clear subject to attract attention of the right users.

So maybe it is not that simple. Or maybe there are not many Ruby users reading this forum. Have you tried to ask on Ruby support channels (whatever they are)? I doubt your question is in any way specific to openSUSE.