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.
-
Rename
README_example.mdtoREADME.mdand commit. Then openREADME.mdand…-
Replace
TITLEwith a meaningful title, e.g.Pretty Calc - A pretty calculator(be sure you search case sensitive!) -
Replace all occurrences of
GITHUBto the name of the GitHub account where your repository lies, e.g.jmuheim -
Replace all occurrences of
PROJECTto your project’s downcased name, e.g.pretty_calcforPretty Calc
-
-
Change the content of
.ruby-gemsetfile 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::ApplicationwithPROJECT::Application(e.g.PrettyCalc::Application), every occurrence ofmodule Basewithmodule PROJECT(e.g.module PrettyCalc), and every occurrence ofBase::withPROJECT::(e.g.PrettyCalc::) -
‘$ cp config/secrets.example.yml config/secrets.yml`, then edit `secrets.yml` contents appropriately
-
Change the value of
session_storeinconfig/initializers/session_store.rbto_PROJECT_session(whilePROJECTis your project’s downcased and underscored name) -
Change the value of
config.mailer_senderinconfig/initializers/devise.rbto 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
Guardfileandconfig/development.rbto e.g.35730 -
Change the value of
portinconfig/puma.rband the value ofconfig.action_mailer.default_url_optionsinconfig/development.rbto e.g.3050-
Note: in your browser, you will have to connect to your app using this port, e.g.
localhost:3050!
-
-
-
Create an
.rspecfile 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)
-
-
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:
-
‘$ cd “$(brew –repo homebrew/core)”`
-
In ‘Formula/pandoc.rb`, replace the contents of `url` with `hackage.haskell.org/package/pandoc-1.19.2.4/pandoc-1.19.2.4.tar.gz` and the contents of `sha256` with `bbe08c1f7fcfea98b899f9956c04159d493a26f65d3350aa6579aa5b93203556`
-
-
Now you can install Pandoc: ‘$ brew install pandoc`
-
-
MiniMagick
-
‘$ brew install imagemagick`
-
Last but not least: run $ rails spec to see if everything’s working, then commit all your changes.
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).