Check for pending migrations doesn't work when rake is in an indirect dependency
Open
Nobody has claimed this yet.
help-wanted
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
We just noticed that the functionality added in #1418 isn't working in our Rails app (which uses Rake).
The culprit appears to be this line
When running debugger:
(ruby) defined?(::Rake)
nil
However when rake is added to our Gemfile the check works.
Perhaps it would be better to execute the code without Rake?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/tapioca/dsl/pipeline.rb line 232 and reproduce the pending-migration check in a Rails app where Rake is only an indirect dependency. Trace why defined?(::Rake) is nil, then verify that the check works without adding Rake directly to the Gemfile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100