Skip to content

Conversation

@meltar
Copy link

@meltar meltar commented May 3, 2013

This app is on Heroku here: http://vast-beyond-3560.herokuapp.com/

Do you have any suggestions for the eagle level? Making a gem with a database doesn't seem right.

@jwo
Copy link
Member

jwo commented May 6, 2013

Most excellent on the about gem and getting it online. No suggestions there.

for the gem with a database --- your instincts are right that the gem shouldn't automatically have its own database. But, you could have it add its migrations to your app's existing database.

So it's like your gem would tell in its README that there needs to be a db/migrate folder setup, and if you run 'rake yourgem:install' it would copy its migrations into that folder. You'd have to create the rake task and get it loaded into the App.

So your migrations get added to the existing app's migrations. This is the theory of what Spree and Devise do --- they decorate apps with the migrations needed.

I do think this exercise is the most ambitious --- it's more about thinking of how your code could interact with other people's code. If you want to try it out, go for it and we can work through it.

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