Ruby on Rails: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 41: Line 41:
* [https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-22-04 Install Ruby on Rails with rbenv]
* [https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-22-04 Install Ruby on Rails with rbenv]
* [https://guides.rubyonrails.org/configuring.html Configuring Rails Applications]
* [https://guides.rubyonrails.org/configuring.html Configuring Rails Applications]
* [https://rvm.io/  Ruby Version Manager (RVM)]
* [https://reinteractive.com/articles/Rails-Configuration-Files Rails Configuration Files]
* [https://reinteractive.com/articles/Rails-Configuration-Files Rails Configuration Files]
* [[JQ Tool]]
* [[JQ Tool]]

Revision as of 22:07, 11 March 2023

Ruby » RVM

for PROFILE_NAME in .bash_profile .bashrc .mkshrc .profile .zlogin .zshrc;do
    if  [[ -e ${HOME}/${PROFILE_NAME} ]]&&[[ -s ${HOME}/${PROFILE_NAME} ]]&&
        [[ "$(grep -c '${HOME}/.rvm/scripts/rvm' ${HOME}/${PROFILE_NAME})" == 0 ]];then
            tee -a ${HOME}/${PROFILE_NAME} >/dev/null <<'EOF'

# load rvm into a shell session
if  [[ ! "${PATH}" =~ "${HOME}/.rvm/bin:" ]]&&
    [[ -x "${HOME}/.rvm/scripts/rvm" ]];then

    export PATH=${HOME}/.rvm/bin:${PATH}
    source ${HOME}/.rvm/scripts/rvm
fi
EOF
    fi
done

Ruby » RBENV

if  [[ -e ${HOME}/.bashrc ]]&&[[ -s ${HOME}/.bashrc ]]&&
    [[ "$(grep -c '${HOME}/.rbenv/bin/rbenv' ${HOME}/.bashrc)" == 0 ]];then
        tee -a ${HOME}/.bashrc >/dev/null <<'EOF'

# rbenv config
if  [[ ! "${PATH}" =~ "${HOME}/.rbenv/bin:" ]]&&
    [[ -x "${HOME}/.rbenv/bin/rbenv" ]];then

    export PATH=${HOME}/.rbenv/bin:${PATH}
    eval "$(rbenv init -)"
fi
EOF
fi

References