spree/spree-guides — pull request #239 by dpritchett (2014-06-26 20:55:50+00:00)
Title: Extension doc clarification

Real world example of a need for this clarification:
```
3:29 PM I have a question about installing extensions
3:30 PM according to the guide, we are suppost to run a rails generated migration. Do we do that in our application directory, or in our "simple_sales" extension director
3:30 PM http://guides.spreecommerce.com/developer/extensions_tutorial.html

3:34 PM BAMbanda: is it your extension or someone else's?
3:34 PM dpritchett, it's mine, I created manually, following the guide
3:35 PM usually when i use a spree extension i 1) add it to my spree store's gemfile, 2) bundle install, 3) run the extension installer if necessary, 4) run the extension railties to generate migrations if necessary 5) run rake db: migrate if necessary
3:35 PM all this without ever messing with the extension
3:35 PM since it's your own extension you should know if you built an installer or any railties or whatever
3:35 PM but yeah you run all of that from within your spree app's context and not that of the extension
3:36 PM assuming your extension is self-contained in another folder outside of your app repo
3:36 PM ok cool, I generated it though the spree comandline gem, outside my apps repo
3:36 PM rerun it inside your app's repo and it should put the migration in db/migrate
3:36 PM or you could just copy it over
3:36 PM (i think)
3:37 PM yeah, that makes sense, ok thanks
3:37 PM i'm assuming you had a file like this in your extension: https://github.com/spree/spree_gateway/blob/master/lib/generators/spree_gateway/install/install_generator.rb
3:38 PM yup I did
3:38 PM cool

3:38 PM so then in my app, I ran the generator (rails g spree_simple_sales:install)

3:40 PM <•GeekOnCoffee> BAMbanda: pull requests welcome to make things more obvious: https://github.com/spree/spree-guides/blob/master/content/developer/tutorials/extensions_tutorial.md and https://github.com/spree/spree/blob/master/cmd/lib/spree_cmd/templates/extension/README.md
3:43 PM @GeekOnCoffee, thanks
```