#New Ruby project set-up checklist
touch README.md
- bin
- lib/models
- lib/views
- config
Set up a git repo with git init
or by cloning from Github.
.gitignore file with:
*~
.DS_Store
*.sw?
*.un~
*DS_Store
bundle init
Add gems to Gemfile
Create config/environment.rb file with:
require 'bundler/setup'
Bundler.require
require_relative '../lib/path_to_my_files'
rspec --init
For Rake console, create Rakefile (no extension) in the root of site with:
task :environment do
require_relative './config/environment'
end
desc "Loads an interactive console."
task :console => [:environment] do
load './bin/console'
exit
end
For bin/console, create a bin/console file (no extension) with this:
#!/usr/bin/env ruby
require_relative '../config/environment'
Pry.start
Add SimpleCov gem to Gemfile and add SimpleCov.start
to spec/spec_helper.rb