Skip to content
mengfung.com
writing

New Rails Project On Clean System

 ·  1 min read

Creating a new Rails project on a clean system.

Install iTerm2. *My terminal of choice.

Install Xcode and command line tools.

Install Homebrew.

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
## optional
# 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
take my_new_project

2. Create the Rails app.

rails new .

3. Done

Use your favorite text editor. Mine is Sublime and Vi.