Skip to content

Support for Mise's recommended table format #8998

@stormwatch

Description

@stormwatch

Describe the problem as clearly as you can

Specifying a Ruby version supports the simple syntax like showed in Bundler's documentation:

ruby = '3.4.6'

This is a request to also support Mise's recommended table format

Did you try upgrading rubygems & bundler?

Yes.

Post steps to reproduce the problem

Declare your ruby version in your Gemfile

Following Bundler's documentation specifying a Ruby version, specify your Ruby version as follows:

ruby file: "mise.toml"

Create a mise.toml file in the yet unsupported table format

Save the following as mise.toml in the same directory as the Gemfile

[tools]
ruby = { version = "3.4.6", postinstall = "ruby-post-install" }

You may remove the postinstall section if you don't want to run a post-installation script but keep the format with enclosing braces in order to trigger the bug; i.e. you can write a mise.toml like in this alternative:

[tools]
ruby = { version = "3.4.6" }

Which command did you run?

bundle check --verbose

What were you expecting to happen?

❯ bundle check --verbose
Found no changes, using resolution from the lockfile
The Gemfile's dependencies are satisfied

What happened instead?

❯ bundle check --verbose

[!] There was an error parsing `Gemfile`: { is not a valid requirement on the Ruby version. Bundler cannot continue.

 #  from /Users/eze/ejercicios/katas/Template Strings/Gemfile:2
 #  -------------------------------------------
 #  source 'https://rubygems.org'
 >  ruby file: 'mise.toml'
 #
 #  -------------------------------------------

If not included with the output of your command, run bundle env and paste the output below

## Environment

```
Bundler       2.7.2
  Platforms   ruby, x86_64-darwin-21
Ruby          3.4.6p54 (2025-09-16 revision dbd83256b1cec76c69756ecb8758b9e1079833de) [x86_64-darwin-21]
  Full Path   /Users/eze/.local/share/mise/installs/ruby/3.4.6/bin/ruby
  Config Dir  /Users/eze/.local/share/mise/installs/ruby/3.4.6/etc
RubyGems      3.7.2
  Gem Home    /Users/eze/.local/share/mise/installs/ruby/3.4.6/lib/ruby/gems/3.4.0
  Gem Path    /Users/eze/.gem/ruby/3.4.0:/Users/eze/.local/share/mise/installs/ruby/3.4.6/lib/ruby/gems/3.4.0
  User Home   /Users/eze
  User Path   /Users/eze/.gem/ruby/3.4.0
  Bin Dir     /Users/eze/.local/share/mise/installs/ruby/3.4.6/bin
Tools         
  Git         2.51.0
  RVM         not installed
  rbenv       not installed
  chruby      not installed
```

## Bundler Build Metadata

```
Timestamp  2025-09-09
Git SHA    b463ced1459
```

## Bundler settings

```
gem.changelog
  Set for the current user (/Users/eze/.bundle/config): false
gem.ci
  Set for the current user (/Users/eze/.bundle/config): false
gem.linter
  Set for the current user (/Users/eze/.bundle/config): "rubocop"
gem.test
  Set for the current user (/Users/eze/.bundle/config): "minitest"
```

## Gemfile

### Gemfile

```ruby
source 'https://rubygems.org'
ruby file: 'mise.toml'

group :development do
  gem 'logger', '~> 1.7', require: false
  gem 'minitest', '~> 5.25', require: false
  gem 'rake', '~> 13.3', require: false
  gem 'rubocop', '~> 1.80', require: false
  gem 'rubocop-minitest', '~> 0.38.2', require: false
  gem 'rubocop-performance', '~> 1.26', require: false
  gem 'rubocop-rake', '~> 0.7.1', require: false
  gem 'simplecov', '~> 0.22.0', require: false
end
```

### Gemfile.lock

```
GEM
  remote: https://rubygems.org/
  specs:
    ast (2.4.3)
    docile (1.4.1)
    json (2.15.0)
    language_server-protocol (3.17.0.5)
    lint_roller (1.1.0)
    logger (1.7.0)
    minitest (5.25.5)
    parallel (1.27.0)
    parser (3.3.9.0)
      ast (~> 2.4.1)
      racc
    prism (1.5.1)
    racc (1.8.1)
    rainbow (3.1.1)
    rake (13.3.0)
    regexp_parser (2.11.3)
    rubocop (1.81.0)
      json (~> 2.3)
      language_server-protocol (~> 3.17.0.2)
      lint_roller (~> 1.1.0)
      parallel (~> 1.10)
      parser (>= 3.3.0.2)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 2.9.3, < 3.0)
      rubocop-ast (>= 1.47.1, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 2.4.0, < 4.0)
    rubocop-ast (1.47.1)
      parser (>= 3.3.7.2)
      prism (~> 1.4)
    rubocop-minitest (0.38.2)
      lint_roller (~> 1.1)
      rubocop (>= 1.75.0, < 2.0)
      rubocop-ast (>= 1.38.0, < 2.0)
    rubocop-performance (1.26.0)
      lint_roller (~> 1.1)
      rubocop (>= 1.75.0, < 2.0)
      rubocop-ast (>= 1.44.0, < 2.0)
    rubocop-rake (0.7.1)
      lint_roller (~> 1.1)
      rubocop (>= 1.72.1)
    ruby-progressbar (1.13.0)
    simplecov (0.22.0)
      docile (~> 1.1)
      simplecov-html (~> 0.11)
      simplecov_json_formatter (~> 0.1)
    simplecov-html (0.13.2)
    simplecov_json_formatter (0.1.4)
    unicode-display_width (3.2.0)
      unicode-emoji (~> 4.1)
    unicode-emoji (4.1.0)

PLATFORMS
  ruby
  x86_64-darwin-21

DEPENDENCIES
  logger (~> 1.7)
  minitest (~> 5.25)
  rake (~> 13.3)
  rubocop (~> 1.80)
  rubocop-minitest (~> 0.38.2)
  rubocop-performance (~> 1.26)
  rubocop-rake (~> 0.7.1)
  simplecov (~> 0.22.0)

RUBY VERSION
   ruby 3.4.6p54

BUNDLED WITH
   2.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions