標籤:hub UI curl apt-get sql libxml2 shel nbsp clone
1、安裝所需依賴
sudo apt-get updatesudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
2、安裝git sudo apt-get install git
3、http://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04
下載rbenv 並設定好環境變數:
git clone https://github.com/rbenv/rbenv.git ~/.rbenvecho ‘export PATH="$HOME/.rbenv/bin:$PATH"‘ >> ~/.bashrcecho ‘eval "$(rbenv init -)"‘ >> ~/.bashrcexec $SHELL
下載ruby源碼 設定環境變數
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-buildecho ‘export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"‘ >> ~/.bashrcexec $SHELL
安裝:
rbenv install 2.3.1rbenv global 2.3.1ruby -v
rbenv --》ruby envirement 大概是這兩個單詞的縮寫,用來配置ruby的環境和安裝的
ubuntu 安裝ruby