I run up a new Rails app often enough that I have a certain way I like to do things, but infrequently enough that I normally have to spend a bit of time on Google/Stack Overflow remembering how to do it that way. This checklist is my attempt to remedy that.
If I’m starting a new project I want to be starting with the latest (usually stable) ruby.
brew upgrade rbenv ruby-build
rbenv install -l
rbenv install 2.5.3
rbenv global 2.5.3
I also want it to be on the latest (again, stable) Rails.
gem list rails --remote -e --all
(-e for exact match, –all shows all versions, not just the latest… is optional)
gem install rails -v 5.2.1
gem install rails
to get latestgem install rails -v '~> 5.0
to get latest 5.x.y versionMy philosophy (as a relative newbie) is to pretty much use Rails “The Rails Way” (the Basecamp way?). At this stage that means I don’t monkey with the default gems (with one exception), I just use the default test framework, javascript framework, etc initially. I do change my dev database to Postgres however.
rails new --skip-bundle --database=postgresql <app-name>
bundle
rails haml:erb2haml
I use Github mainly due to inertia/convenience. I have tried Bitbucket, and like being able to hide my work in private repositories for free, but it’s probably good for me to develop “in the open” a bit more.
git add .
git commit
:
git remote add origin git@github.com:<user>/<repo-name>.git
git push -u origin master
Next steps should probably be along the lines of (not necessarily in this order):
These are some things I might want to think about enhancing next time I use this checklist (or review this process).
curl -H "Authorization: token 12d3fd45f6ac7c89012345678db901ac2a3456f7" '[api.github.com/user/repo...](https://api.github.com/user/repos') -d '{"name":"test-repo"}'