Setting Up a Ruby on Rails Environment on macOS
2017-03-26 02:58 (9 years ago)

Let's install rbenv using git clone instead of apt or brew.
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ . ~/.bashrc
$ rbenv install -l
$ rbenv install 2.4.1
# After the installation is complete, restart the terminal or reload .bashrc
$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
$ cd ~/.workspace/
$ gem install rails
$ rails --version
Rails 5.0.2
$ rails new ytyng-tools
$ cd ytyng-tools
$ rbenv local 2.4.1
$ rails s
Please rate this article (No signup or login required)
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.