I want to write an automated bash script for installing Ruby and Rails using rbenv, but I am getting session reload issues in the terminal.#!/bin/bashecho Installing rbenv..git clone https://github.com/rbenv/rbenv.git ~/.rbenvgit clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-buildecho 'export PATH=$HOME/.rbenv/bin:$PATH' >> ~/.bashrcecho 'eval $(rbenv init -)' >> ~/.bashrcsource ~/.bashrcresetecho Finished installing rbenv#!/bin/bashrbenv -vecho Installing ruby..sudo rbenv install 2.2.3rbenv global 2.2.3echo Finished installing rubyruby -vecho gem: --no-document > ~/.gemrcecho Installing rails..sudo apt-get install ruby-devsudo gem install bundlergem install rails -v 4.2.3rbenv rehashecho Finished installing railsrails -vrbenv rehash
Install Ruby using rbenv in a bash script
ruby;ruby on rails;bash;shell;installer