If you need to upgrade your Ubuntu to a new release.
sudo apt update
sudo apt install update-manager-core # do what the prompt wants you to do like
# sudo apt autoremove
Wait a few minutes/hours, you should have upgraded your server.
Creating a new Rails project on a clean system.
Install iTerm2. *My terminal of choice.
Install Xcode and command line tools.
Install OhMyZSH. *My preferred shell.
Install rvm or rbenv or docker.
# Installing the ruby you want or need to use.
rvm list known
# Installing 2.5.1
rvm install 2.5.1 --default # sets 2.5.1 as your default ruby
# install rails
gem install rails bundler
# figure out how many cores are on your system
sysctl -n hw.ncpu
# number of cores and ram can effect workers
# mine returned 8 so i'll use 7 workers.
# global config for bundler to use 7 workers
bundle config --global jobs 7
I prefer to use rvm on my development system and/or docker, I moved over from vagrant and vmware fusion. I prefer rvm on my dev system over rbenv. But I prefer rbenv over rvm on production servers if i’m not using docker.
Using MyNewProject as the project name.
1. Create the working directory.
mkdir my_new_project && cd $_
# If using OhMyZSH
2. Create the Rails app.
Use your favorite text editor. Mine is Sublime and Vi.