This is not a Twitter Bootstrap gem!
This project provides a nice starting point for new projects. It includes the gems I end up installing and using before or later...
- Rails 4.2.1
- Unicorn
- Slim
- New Relic (optional, needs config file)
- sqlite3 (development)
- pg (production)
- Paranoia - Never Delete Anything
- RSpec
- Capybara (with Selenium on Chrome driver)
- FactoryGirl
- Faker - Generate fake data for realistic tests
- DatabaseCleaner - Cleanup the Test Database
- Timecop - Freeze time during tests
- guard-rspec - Run tests as the file changes
- Whenever - Manage cron jobs
- FriendlyId - Easy slugs in URLs
- Draper - Decorators on steroids
- RedCarpet - Easy Markdown rendering
- Spring (with RSpec support)
- guard-livereload - Reload the browser as the file changes
- meta_request - See request details in Chrome Developer Tools
- Capistrano and plugins - Easy deploy
I decided to not include Carrierwave or Paperclip to avoid religious wars and since them both require a small amount of configuration depending on your use case.
As of today, Rails own secrets.yml covers most of Figaro's use cases. If you still miss it, however, just add it to the Gemfile and run figaro install
.
Choose a name for your app, say myapp
git clone https://github.com/aomega08/rails_bootstrap
cd rails_bootstrap
bundle install
rails g rename:app_to myapp
Remove the rename
gem from the Gemfile and run bundle
again.
Log in to New Relic, create a new app and put the received newrelic.yml file in the config directory.
When you're ready to deploy remember to configure Capistrano in the config/deploy.rb
file and config/deploy/production.rb
file. For help use the official documentation.
By default, unicorn has been configured to listen on a socket. Install nginx and configure it to act as a proxy on that socket. This method has a few advantages like fast redirects, easy caching, SSL, multisite configuration and direct static asset access.
If however you just want to expose Unicorn to the world, change the config/unicorn/production.rb
to listen on port 80. This is not recommended.
Then run
cap production deploy
Enjoy.