Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce binstubs to set RUBYOPT for development #181

Merged
merged 1 commit into from
Mar 17, 2023

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
Development

Successfully merging this pull request may close these issues.

1 participant