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

Update factory_bot_rails.gemspec #479

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JuanVqz
Copy link

@JuanVqz JuanVqz commented Jul 4, 2024

I am currently in the process of upgrading from Ruby 2.6 to Ruby 3.0. Initially, I didn't find any restrictions on updating my current factory_bot_rails version to the latest one. Unfortunately, this turned out to be incorrect. The latest version of factory_bot_rails requires factory_bot v6.4, which requires Ruby 3, causing my update to fail.

SyntaxError: /root/project/vendor/bundle/ruby/2.6.0/gems/factory_bot-6.4.5/lib/factory_bot/evaluator.rb:38: syntax error, unexpected ...
...method_missing(method_name, ...)

So, adding the required_ruby_version might help to prevent the misconception.

References:

I am currently in the process of upgrading from Ruby 2.6 to Ruby 3.0. Initially, I didn't find any restrictions on updating my current factory_bot_rails version to the latest one. Unfortunately, this turned out to be incorrect. The latest version of factory_bot_rails requires factory_bot v6.4, which in turn requires Ruby 3, causing my update to fail.

```
SyntaxError: /root/project/vendor/bundle/ruby/2.6.0/gems/factory_bot-6.4.5/lib/factory_bot/evaluator.rb:38: syntax error, unexpected ...
...method_missing(method_name, ...)
```

So, adding the `required_ruby_version` might help to prevent the misconception.

References:
  - thoughtbot/factory_bot#1614
  - thoughtbot/factory_bot@36bd065
  - https://github.com/thoughtbot/factory_bot/pull/1622/files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant