This is a guide to write better Rails apps for the future.
You can easily set up your laptop by running kaishi, a shell script to convert any Mac OS X or Linux computer into a real development machine.
Or if you don't want all the trouble you can easily download Docker and start working right away.
We have developed a gem to help you configure the rails application with all the tools we use to develop applications.
To install it just run:
% gem install platter
We created a how-to wiki article for you to follow and setup the application.
If for some reason you find it hard to run it or something is missing about the app, talk to the project manager about the issue.
We love git, we use it for every single project. Check out the Git guide for information about this.
There are simple guidelines when providing code review to a teammate. The most particular are:
- Review for SQL injection vulnerability
- Review index on foreign keys
- Check the migrations integrity
- Review views for excess usage of helpers or variable declaration
- Detect N+1 queries on models, and suggest to use eager loading when necessary
We also try our best to follow these best practices
It is important that you always deploy from the master of your local computer to the production environment on Heroku. To see more about new feature branches and staging environment, checkout the git guide.
Whenever we are deploying an application to production for the first time, we make sure we have everything covered:
- Are we on deploying to heroku or using docker?
- Are we using Unicorn or Puma as the server? Setup Rails server
- Are we using Delayed jobs for sending emails?
- Is Ruby 2.x.x defined in the Gemfile?
- Are we using Figaro to setup the environment variables? Setup Figaro
- Are we saving logs through one of the providers or locally?
- Are we backing up the databases?
- Are we monitoring the application performance? New Relic
- Are we tracking errors? Exception Notification
- Is the domain configured? Domain Configuration
- Is Sendgrid/Mailgun configured for email delivering?