项目作者: marlospomin

项目描述 :
Ruby-Rbenv, install ruby and rails with a single script.
高级语言: Shell
项目地址: git://github.com/marlospomin/ruby-rbenv.git
创建时间: 2017-06-09T23:06:53Z
项目社区:https://github.com/marlospomin/ruby-rbenv

开源协议:MIT License

下载


Installing Ruby with Rbenv

This repository was originally meant to whoever is struggling installing ruby with rbenv or ruby/rails in general, this process can be done using ruby-installer.sh or with a manual installation with the appropriate steps found in the section below.

Usage

Use the following commands to run the script:

  1. $ cd ~
  2. $ git clone ruby-rbenv
  3. $ mv ruby-rbenv/ruby-installer.sh ~
  4. $ ./ruby-installer.sh

This script was not properly tested and will install rails, take it with a grain of salt, though, if you have doubts about using it, just use the manual steps.

If the script doesn’t run use chmod and allow it to be executed.

> Manual Installation

  1. # clone rbenv source code and add it do PATH
  2. git clone https://github.com/rbenv/rbenv.git ~/.rbenv
  3. # initialize rbenv
  4. echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
  5. echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
  6. # clone ruby-build to compile and install ruby
  7. git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
  8. echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
  9. source ~/.bash_profile
  10. # install ruby globally
  11. rbenv install -v 2.2.6
  12. rbenv global 2.2.6
  13. # check if ruby were installed properly
  14. ruby -v
  15. # install bundler and rails
  16. gem install bundler
  17. rbenv rehash
  18. gem install rails
  19. rbenv rehash
  20. # check your rails version
  21. rails -v

> Contributing

In case you know how/want to improve this repository feel free to do so, just make a pull request and we will go from there.

License

Released under MIT.