nise_ bosh搭建cloudfoundry 使用rbenv代替rvm

1.安装rbenv环境

$ sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core 

$ cd 

$ git clone git://github.com/sstephenson/rbenv.git .rbenv 

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc

$ exec $SHELL

$ mkdir -p ~/.rbenv/plugins 

$ cd ~/.rbenv/plugins 

$ git clone git://github.com/sstephenson/ruby-build.git

$ rbenv install 1.9.3-p194

#You will have to rehash everytime you install a Ruby version or a gem

$ rbenv rehash 

$rbenv global 1.9.3-p194

$ irb

参考自:http://www.stehem.net/2012/05/08/how-to-install-ruby-with-rbenv-on-ubuntu-12-04.html

里面出现安装包的错误:解决方法如下

gem install nokogiri -v '1.5.6'
sudo apt-get install libxslt-dev libxml2-dev
gem install eventmachine -v '0.12.10'
sudo apt-get install build-essential 
2.安装rbenv-sudo

  2.1 Setup rbenv
  2.2 Make sure you have a plugins directory:
      mkdir ~/.rbenv/plugins
  2.3 Clone rbenv-sudo into the plugins directory:
      git clone git://github.com/dcarley/rbenv-sudo.git ~/.rbenv/plugins/rbenv-sudo

reference:https://github.com/dcarley/rbenv-sudo


3 usage:

      $ rbenv sudo chef-solo --version
      Chef: 0.10.8
      $ rbenv sudo ruby --version
      ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
      $ rbenv sudo ruby -e "puts Process.uid"
      0



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值