Rails Shoppe Challenge

Get Started. It's Free
or sign up with your email address
Rocket clouds
Rails Shoppe Challenge by Mind Map: Rails Shoppe Challenge

1. Heroku deployment tips

1.1. they have amazingly well-written docs and tutorials

1.1.1. use them

1.2. "No Procfile detected, using the default web server"

1.2.1. use thin

1.3. for troubleshooting

1.3.1. heroku run rails console

1.3.2. heroku logs --tail

1.3.3. I keep both of those open in new iTerm tabs

1.4. create the app with a name you can remember

1.4.1. heroku create my-chosen-name

1.4.2. or google "heroku rename"

1.5. DB stuff

1.5.1. in database.yml

1.5.1.1. delete the production: settings

1.5.1.1.1. heroku makes its own anyway

1.5.2. what if your production DB crashes?

1.5.2.1. look for a PG backup add-on

1.5.3. heroku pg:pull DATABASE_URL my-chosen-name_development

1.5.4. heroku pg:push my-chosen-name_development DATABASE_URL

1.6. if your CSS/JS changes work in development but not on heroku

1.6.1. check if "rake assets:precompile" is getting run during deployment

1.6.2. if not, you may have done it manually and there's a manifest.json file in your /assets folder

1.6.2.1. delete it (or gitignore it)

1.7. if something goes wrong, you can easily roll back your heroku app

1.7.1. log in to heroku and go to your app

1.7.2. go to history

1.8. shortcuts

1.8.1. In my ~/.bash_profile I added

1.8.1.1. alias gh='git push heroku master'

1.8.1.2. alias ghh='git push heroku master && heroku run rake db:migrate'

2. Auth

2.1. authentication

2.2. authorization

2.2.1. Hartl Rails tutorial Chapter 8

3. ActionMailer

3.1. use (or create) a different Gmail account than your main one

4. Layout/Views Tips

4.1. 1

4.1.1. Create and use a _navigation_bar partial in layouts

4.2. 2

4.2.1. For any resource, use _resource partial and render @resources

4.3. 3

4.3.1. Test out the asset pipeline early, with your image placeholder

5. Design

5.1. SASS vs SCSS