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.md
toREADME.md
and commit. Then openREADME.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
forPretty 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
withPROJECT::Application
(e.g.PrettyCalc::Application
), every occurrence ofmodule Base
withmodule 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_store
inconfig/initializers/session_store.rb
to_PROJECT_session
(whilePROJECT
is your project’s downcased and underscored name) -
Change the value of
config.mailer_sender
inconfig/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
andconfig/development.rb
to e.g.35730
-
Change the value of
port
inconfig/puma.rb
and the value ofconfig.action_mailer.default_url_options
inconfig/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)
-
-
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).