Skip to content

Instantly share code, notes, and snippets.

@jaybobo
Last active August 10, 2017 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaybobo/0175b0d4d39ae36369b4faa639dde691 to your computer and use it in GitHub Desktop.
Save jaybobo/0175b0d4d39ae36369b4faa639dde691 to your computer and use it in GitHub Desktop.
Rails & Development Resources

Rails

Default rails apps come setup for the SQLite database but SQLite is not supported by Heroku. You may want to use Postgres initially instead. https://www.digitalocean.com/community/tutorials/how-to-setup-ruby-on-rails-with-postgres

Authentication

Devise - gives you "all the things" - you use omniauth to setup social media login, allow password resets, setup email confirmation, register accounts. https://github.com/plataformatec/devise

Authorization

Pundit - you can create your own authorization system to create user roles and page access or use something like pundit. https://github.com/elabs/pundit

Styling

Bootstrap - use the official gem. The others are junk. https://github.com/twbs/bootstrap-sass

Stripe

For charging credit cards but f you need an e-commerce store, just setup something like Shopify or Big Cartel. Don't build one by hand with Stripe. https://stripe.com/

Dwolla

If you need to do bank transfers directly from someone's checking account. https://www.dwolla.com/

Twilio

For sending automated text messages to people. https://www.twilio.com/docs/

Heroku

For deploying your Rails applications publicly to the internet. They have great documentation. https://devcenter.heroku.com/articles/getting-started-with-rails5

You can find about setting up your website name here on Heroku. https://devcenter.heroku.com/articles/custom-domains

Transactional Email

You have a ton of choices here. Here's a good post on picking which one is right for your app.

If you want to skip setting up postgres on your computer, you can use sqlite3 for development. This is not something I suggest long-term depending on how much postgres functionality you want to use eventually. The danger here is that you could possibly not spot any database issues until they are in production. Additionally, SQLite has less features than Postgres.

  1. Read the Heroku 'Ruby on Rails' guides thoroughly
  2. Modify Gemfile
      #In Gemfile
      gem 'pg', group: :production
      gem 'sqlite3, group: [:development, :test]
  3. Follow any other Heroku instructions for other gems or setup (eg. rails_12factor, Procfile)
  4. Push your code to a GitHub repository for safekeeping (private or public repo)
  5. Deploy to Heroku git push heroku master
  6. Don't forget to run heroku migrations after your first deploy heroku run rake db:migrate and anytime you have new migrations that need to be run against production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment