Skip to content
/ base Public

Pre-configured basic Rails project which aims to initialize a new project fast and painless - simply fork it!

Notifications You must be signed in to change notification settings

jmuheim/base

Repository files navigation

Base Project

This is a basic Rails project with everything configured the way I want. To fork it, create a new repository on GitHub, clone it to your computer, and execute git remote add upstream [email protected]:jmuheim/base.git to add Base’s original repository as upstream. Now you can always merge Base’s code into your project using git pull upstream master.

Additional TODOs in your fork

  • Rename README_example.md to README.md and commit. Then open README.md and…

    • Replace TITLE with a meaningful title, e.g. Pretty Calc - A pretty calculator (be sure you search case sensitive!)

    • Replace all occurrences of GITHUB to the name of the GitHub account where your repository lies, e.g. jmuheim

    • Replace all occurrences of PROJECT to your project’s downcased name, e.g. pretty_calc for Pretty Calc

  • Change the content of .ruby-gemset file to the name of your fork’s repository

  • Execute the following:

    • $ rvm use . (activates the RVM gemset)

    • $ bundle (installs the gems) (if bundler isn’t installed already, first execute $ gem install bundler)

  • Replace all occurrences of Base::Application with PROJECT::Application (e.g. PrettyCalc::Application), every occurrence of module Base with module PROJECT (e.g. module PrettyCalc), and every occurrence of Base:: with PROJECT:: (e.g. PrettyCalc::)

  • ‘$ cp config/secrets.example.yml config/secrets.yml`, then edit `secrets.yml` contents appropriately

  • Change the value of session_store in config/initializers/session_store.rb to _PROJECT_session (while PROJECT is your project’s downcased and underscored name)

  • Change the value of config.mailer_sender in config/initializers/devise.rb to some useful email address (e.g. [email protected])

  • We want to use ports different to the default ports, so they don’t clash with other Rails apps:

    • Change the Rack Livereload port in Guardfile and config/development.rb to e.g. 35730

    • Change the value of port in config/puma.rb and the value of config.action_mailer.default_url_options in config/development.rb to e.g. 3050

      • Note: in your browser, you will have to connect to your app using this port, e.g. localhost:3050!

  • Create an .rspec file with your specific RSpec config, e.g. --color

  • Execute the following:

    • $ rails db:setup (sets up the database with seed data))

    • $ rails db:test:prepare (prepare test database)

Install needed software

  • Pandoc ‘>= 1.16` and `< 2.0`

    • Homebrew doesn’t offer Pandoc ‘< 2.0` anymore, but we can sneak it into the current formula like so:

    • Now you can install Pandoc: ‘$ brew install pandoc`

  • MiniMagick

    • ‘$ brew install imagemagick`

Run specs

Last but not least: run $ rails spec to see if everything’s working, then commit all your changes.

Complement README.md

As there are now both a <code>README.md</code> and <code>README.rdoc</code> file, GitHub will show the <code>README.md</code> when browsing the repository. So please complement <code>README.md</code> with your project specific details (and leave <code>README.rdoc</code> in place).

About

Pre-configured basic Rails project which aims to initialize a new project fast and painless - simply fork it!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •