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

Don't try to load generators if Rails is loaded but ActiveRecord is not. #627

Closed
wants to merge 2 commits into from

Conversation

flop
Copy link

@flop flop commented Aug 18, 2023

The generators are implicitly dependent on ActiveRecord, so if you are using Rails and you are not using ActiveRecord (We use Sequel with Rails), mobility would not load correctly and we would get the following error :

`require': cannot load such file -- rails/generators/active_record (LoadError)

This patch explicitly check that ActiveRecord is loaded before requiring the generators.

Florent Piteau and others added 2 commits August 18, 2023 17:42
The generators are dependent on ActiveRecord, so if you are using rails
without active_record, mobility would not load :

```
`require': cannot load such file -- rails/generators/active_record
(LoadError)
```
@shioyama
Copy link
Owner

Can you rebase this on master? Should be green then.

@shioyama shioyama closed this in 05c2f27 Mar 20, 2024
@shioyama
Copy link
Owner

shioyama commented Mar 20, 2024

I cherry-picked the first commit but not the dirty accessors one, thanks! ❤️

@flop
Copy link
Author

flop commented Mar 20, 2024

Thanks. Sorry for the second commit.. It was added automatically when I was trying to fix something else. I should have created a specific branch.

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.

2 participants