I'd like to try running Rails 6 with TruffleRuby, so I installed truffleruby-22.0.0.2 with rbenv, added in my Gemfile ruby 'truffleruby-22.0.0.2 and ran bundle install, but that didn't work. I got an error with "... error parsing Gemfile: Illformed requirement..."
What's the right way to use Rails with TruffleRuby?
If this is still relevant: you can see here https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md that as of now Truffle Ruby aims to be compatible with MRI Ruby 3.0.3, so it sets the
RUBY_VERSIONenv variable to 3.0.3 and this is the value you should set in your Gemfile.Unfortunately, when you do so
rbenvcan't detect that you want to use Truffle Ruby instead of MRI. So you should also runexport RBENV_VERSION=truffleruby+graalvm-devand thenbundlerwould target to 3.0.3 whilerbenvwould use Truffle Ruby.To know what is the target version detected by
bundleryou can specify any valid ruby version (like 3.1.2 or something) and runningbundlewould output more clarifying error message like this: