Git Product home page Git Product logo

jumpstart's Introduction

👉 We've also built Jumpstart Pro which is a version of Jumpstart that includes payments with Stripe & Braintree, team accounts, TailwindCSS, and much more.

Jumpstart Rails Template

All your Rails apps should start off with a bunch of great defaults. It's like Laravel Spark, for Rails.

Want to see how it works? Check out the Jumpstart walkthrough video:

Jumpstart Ruby on Rails Template Walkthrough

Getting Started

Jumpstart is a Rails template, so you pass it in as an option when creating a new app.

Requirements

You'll need the following installed to run the template successfully:

  • Ruby 2.5 or higher
  • bundler - gem install bundler
  • rails - gem install rails
  • Database - we recommend Postgres, but you can use MySQL, SQLite3, etc
  • Redis - For ActionCable support
  • ImageMagick or libvips for ActiveStorage variants
  • Yarn - brew install yarn or Install Yarn
  • Foreman (optional) - gem install foreman - helps run all your processes in development

Creating a new app

rails new myapp -d postgresql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb

Or if you have downloaded this repo, you can reference template.rb locally:

rails new myapp -d postgresql -m template.rb

❓Having trouble? Try adding DISABLE_SPRING=1 before rails new. Spring will get confused if you create an app with the same name twice.

Running your app

bin/dev

You can also run them in separate terminals manually if you prefer.

A separate Procfile is generated for deploying to production on Heroku.

Authenticate with social networks

We use the encrypted Rails Credentials for app_id and app_secrets when it comes to omniauth authentication. Edit them as so:

EDITOR=vim rails credentials:edit

Make sure your file follow this structure:

secret_key_base: [your-key]
development:
  github:
    app_id: something
    app_secret: something
    options:
      scope: 'user:email'
      whatever: true
production:
  github:
    app_id: something
    app_secret: something
    options:
      scope: 'user:email'
      whatever: true

With the environment, the service and the app_id/app_secret. If this is done correctly, you should see login links for the services you have added to the encrypted credentials using EDITOR=vim rails credentials:edit

Enabling Admin Panel

App uses madmin gem, so you need to run the madmin generator:

rails g madmin:install

This will install Madmin and generate resources for each of the models it finds.

Redis set up

On OSX
brew update
brew install redis
brew services start redis
Ubuntu
sudo apt-get install redis-server

Cleaning up

rails db:drop
spring stop
cd ..
rm -rf myapp

jumpstart's People

Contributors

excid3 avatar jasoncharnes avatar williamkennedy avatar mickeytgl avatar andyw8 avatar mariozig avatar dcyoung-dev avatar afomera avatar fig avatar codebyscott avatar gathuku avatar ashwin47 avatar pconley avatar posiczko avatar rodrigoargumedo avatar scottolsen avatar shawnaukstak avatar swanny85 avatar stevepolitodesign avatar stevenbuccini avatar captproton avatar fivenineplusr avatar feliperaul avatar sabettaconsulting avatar toyflish avatar jnajera avatar jespr avatar jamie avatar jakehockey10 avatar dhairyagabha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.