1、安装jruby

  • 下载
wget https://s3.amazonaws.com/jruby.org/downloads/9.1.13.0/jruby-bin-9.1.13.0.tar.gz
  • 解压缩
tar -xvf jruby-bin-9.1.13.0.tar.gz
  • 添加环境变量
[root@bogon ~]# cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/opt/jruby/bin:

export PATH
  • 使环境变量生效
[root@t0-secure-log2 ~]# source .bash_profile
  • 检查是否安装成功
[root@bogon ~]# jruby -v
jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 OpenJDK 64-Bit Server VM 25.91-b14 on 1.8.0_91-b14 +jit [linux-x86_64]

2、安装Bundler

  • 安装
jgem install bundler
  • 修改资源路径

将资源路径修改为国内路径

bundle config mirror.https://rubygems.org https://gems.ruby-china.org

results matching ""

    No results matching ""