Neebulo / rails-setup-guide-for-macos

The purpose of this step by step tutorial is to provide a very simple example of configuring a minimal Rails environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails Setup Guide For macOS

The purpose of this step by step tutorial is to provide a very simple example of configuring a minimal Rails environment.

Software Requirements

  • macOS 10.12.4 or later

Installation Steps

  1. download and install Xcode from Mac App Store

Download Xcode

  1. from the Terminal.app, install command line tools
$ xcode-select --install
  1. download and install MacPorts for OS X

Download MacPorts

  1. download and install Node

Download Node

  1. open Disk Utility, select MacIntosh HD, click Repair Disk Permissions

  2. open the Terminal.app

  3. clone this repository

$ git clone https://github.com/conradwt/rails-setup-guide-for-macos
  1. change directory to the cloned repository
$ cd path/rails-setup-guide-for-macos
  1. remove existing
$ mv ~/.bashrc ~/.bashrc.orig
$ mv ~/.bash_login ~/.bash_login.orig
$ mv ~/.bash_profile ~/.bash_profile.orig
$ mv ~/.profile ~/.profile.orig
$ mv ~/.zshrc ~/.zshrc.orig

Note: Some or most of the above files may not exist. Thus, if you get the following error it's OK:

    e.g.  mv: rename .bashrc to .bashrc.orig: No such file or directory
  1. configure the .profile
$ cp sample.profile $HOME/.profile
$ . ~/.profile

Note: If you see the following message,

**-bash: rbenv: command not found**

please continue to the next step.

  1. set the Git completion
$ cp sample.git-completion.sh $HOME/.git-completion.sh
  1. install required ports from MacPorts
$ chmod +x install-ports.sh
$ ./install-ports.sh
  1. install RBenv
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
  1. install all of the approved plugins RBenv plugins
$ chmod +x install-rbenv-plugins.sh
$ ./install-rbenv-plugins.sh
  1. install Ruby 2.3.3
$ rbenv install 2.3.3
$ rbenv global 2.3.3
  1. install Ruby on Rails web development framework
$ gem install bundler
$ gem install rails
$ rbenv rehash
  1. install Heroku Toolbelt

Download Heroku Toolbelt

  1. open Disk Utility, select MacIntosh HD, click Repair Disk Permissions

  2. set the terminal

$ cp sample.terminal $HOME/.
  1. from the terminal menu, Shell -> Import, select sample.terminal file
Terminal -> Preferences -> Settings, click the 'sample' profile on the left, click Default
  1. create a Github.com account
Note:  Skip this step if you already have an account.
  1. create Git configuration file
$ cp sample.gitconfig ~/.gitconfig
  1. edit the Git configuration file
$ atom ~/.gitconfig

Note: atom editor is being used but you can use any editor to make the modifications to the .gitconfig file.

change the text on the right side of the equal:

  name = <your firstname lastname>
  email = <your e-mail address>

to the text for your name and e-mail that you're using for Github.com:

e.g.

name = John Doe
email = john.doe@example.com
  1. set up PostgreSQL Server
$ sudo mkdir -p /opt/local/var/db/postgresql96/defaultdb
$ sudo chown postgres:postgres /opt/local/var/db/postgresql96/defaultdb
$ sudo su postgres -c '/opt/local/lib/postgresql96/bin/initdb -D /opt/local/var/db/postgresql96/defaultdb'
  1. set PostgreSQL 96 as the default version
$ sudo port select postgresql postgresql96
  1. start the PostgreSQL 96 Server
$ pgstart

$ = stuff that you type in the terminal

Support

Bug reports and feature requests can be filed for the project here:

Contact

Follow Conrad Taylor on Twitter (@conradwt)

Creator

License

This repository is released under the MIT License.

Copyright

© Copyright 2014 - 2017 Conrad Taylor. All Rights Reserved.

About

The purpose of this step by step tutorial is to provide a very simple example of configuring a minimal Rails environment.


Languages

Language:Shell 100.0%