This repo is to be used as a template for Rails projects. This includes gems and associated configurations commonly used in most Rails projects.
For additional information on the setup process that this repo was generated by, please see this gist.
- Clone the project with your desired project name
git clone git@github.com:ryanflach/rails_project_template.git <your-project-name>
cd
into the project directory
cd <your-project-name>
- Remove the existing git repository
rm -rf .git
- Initialize a new git repository
git init
- Create your project on GitHub
hub create
- Bundle
bundle
- Install Figaro
bundle exec figaro install
- Update the database names in
config/database.yml
development:
<<: *default
database: <your_project_name>_development
test:
<<: *default
database: <your_project_name>_test
production:
<<: *default
database: <your_project_name>_production
username: <your_project_name>
password: <%= ENV['<YOUR_PROJECT_NAME>_DATABASE_PASSWORD'] %>
- Initialize the database
bundle exec rake db:{create,migrate}
- Update this README
Should your project need to work with an external API, you will want to add the following:
-
In your
Gemfile
: -
To make these gems available:
bundle
- Add configuration in
spec/rails_helper.rb
:
require 'vcr'
VCR.configure do |config|
config.cassette_library_dir = "spec/vcr_cassettes"
config.hook_into :webmock
end
- In
.gitignore
, ignore the cassettes that will be made:
# Ignore vcr cassettes
/spec/vcr_cassettes