Skip to content

Conversation

@schneems
Copy link
Collaborator

Because syntax_suggest is a default gem you can get conflicts when working on this project with Ruby 3.2+. To fix conflicts you can disable loading syntax_suggest as a default gem by using then environment variable RUBYOPT with the value --disable=syntax_suggest. The RUBYOPT environment variable works the same as if we had entered those flags directly in the ruby cli (i.e. ruby --disable=syntax_suggest is the same as RUBYOPT="--disable=syntax_suggest" ruby). It's needed because we don't always directly execute Ruby and RUBYOPT will be picked up when other commands load ruby (rspec, rake, or bundle etc.).

There are some binstubs that already have this done for you. Instead of running bundle exec rake you can run bin/rake. Binstubs provided:

  • bin/rake
  • bin/rspec

@schneems schneems force-pushed the schneems/rubyopt-binstubs branch 3 times, most recently from 1c3aa75 to a5824df Compare March 17, 2023 01:54
Because `syntax_suggest` is a default gem you can get conflicts when working on this project with Ruby 3.2+. To fix conflicts you can disable loading `syntax_suggest` as a default gem by using then environment variable `RUBYOPT` with the value `--disable=syntax_suggest`. The `RUBYOPT` environment variable works the same as if we had entered those flags directly in the ruby cli (i.e. `ruby --disable=syntax_suggest` is the same as `RUBYOPT="--disable=syntax_suggest" ruby`). It's needed because we don't always directly execute Ruby and RUBYOPT will be picked up when other commands load ruby (`rspec`, `rake`, or `bundle` etc.).

There are some binstubs that already have this done for you. Instead of running `bundle exec rake` you can run `bin/rake`. Binstubs provided:

- `bin/rake`
- `bin/rspec`
@schneems schneems force-pushed the schneems/rubyopt-binstubs branch from a5824df to 3420937 Compare March 17, 2023 01:55
@schneems schneems marked this pull request as ready for review March 17, 2023 01:56
@schneems schneems merged commit 719fe52 into main Mar 17, 2023
@schneems schneems deleted the schneems/rubyopt-binstubs branch March 17, 2023 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants