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

fix rake tasks for rails engine #64

Open
wants to merge 2 commits into
base: master
from

Conversation

@senid231
Copy link

@senid231 senid231 commented Mar 5, 2019

When you are developing rails engine which has connects with two databases you don't have ordinary rails tasks like db:migrate db:structure:load etc. They are moved into app namespace.

so instead of rake db:migrate you need to right rake app:db:migrate.

when you use gem with railtie that has rake tasks in rails engine those task namespaced into app too.
Problem appears when you want to run another rake task inside of yours. For example when we inside app namespace we need to run app:db:migrate instead of `db:migrate.

in this PR I've solved this problem in a same way as active_record does - just call tasks using name related to current db namespace

@metaskills
Copy link
Member

@metaskills metaskills commented Mar 5, 2019

Hmm... mind adding a commit where you add this to the travis.yml file?

before_install:
  - gem install bundler -v 1.17.3
@senid231
Copy link
Author

@senid231 senid231 commented Mar 6, 2019

@metaskills looks like sqlite3 is missing
I think CI should be fixed in a separate MR

I will rebase this one after that

@metaskills
Copy link
Member

@metaskills metaskills commented Mar 6, 2019

Yea, I can work on that in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.