[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |
We prefer to use sublime
/VS Code
for development(you can opt for any IDE though, but that will mean no support from seniors for any issues relating it and that might lead to un-neccessary time waste thats why it is highly preferred to not use any other IDEs). You are encouraged to use sublime or VSCode.
Install Sublime3 (google or use this link) Here we will outline some basic configuration for sublime3 we usually use.
i- Settings Tweaks
In sublime go to preferences->settings
and place these in user settings tab along with other settings.
Don't mess with default settings tab
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)
# Keep code struture in models consistent | |
# Inspired by http://rails-bestpractices.com/posts/75-keep-code-struture-in-models-consistent | |
# One example: (From top to bottom) | |
associations | |
scopes | |
class methods | |
validates | |
callbacks | |
instance methods |
##Refs
Add to Gemfile: gem 'wicked_pdf'
<%= form_for @person do |f| %> | |
<%= f.label :first_name, "First Name" %>: | |
<%= f.text_field :first_name, list: 'first-name' %> | |
<datalist id="first-name"> | |
<% Person.all.each do |person| %> | |
<option value="<%= person.first_name %>"></option> | |
<% end %> | |
</datalist> | |
<%= f.submit %> | |
<% end %> |
#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!
##Notes
- Follow 12 factor design (include the rails_12factor gem)
- Don't forget your
Procfile
with the command to start up your application server - I prefer using external hosted logging services like
Logentries
(not in this guide) - Set up performance monitoring
AppSignal
orNew Relic
(not in this guide)
My notes for Dokku on Digital Ocean.
These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.
Install dokku-cli (gem install dokku-cli
) for a more Heroku-like CLI experience (dokku config:set FOO=bar
).
# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku