Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用rbenv安装ruby 2.2.0 #44

Open
v5tech opened this issue Dec 30, 2014 · 0 comments
Open

使用rbenv安装ruby 2.2.0 #44

v5tech opened this issue Dec 30, 2014 · 0 comments
Labels

Comments

@v5tech
Copy link
Owner

v5tech commented Dec 30, 2014

  • 依赖环境
sudo apt-get install libffi-dev
sudo apt-get update
sudo apt-get install -y git-core curl zlib1g-dev build-essential \
                     libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 \
                     libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common
  • 安装rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
  • 安装ruby
rbenv install 2.2.0
rbenv global 2.2.0
  • Gem提速
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
  • 安装rails
gem install rails -v 4.2.0
rbenv rehash # 导出 gem 中提供的系统命令
  • 查看rails版本
rails -v
  • 安装MySQL
sudo apt-get install mysql-server  mysql-client  libmysqlclient-dev
@v5tech v5tech added the Tips label Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant