ubuntu编译安装ruby1.9.3,从p551降级到p484

在升级redmine的时候遇到ruby版本适配的问题。找了些资料。

ruby安装包除了官方网站,可以参考 http://ftp.ruby-lang.org/pub/ruby/1.9/

 

需要从1.9.3-p551降级到1.9.3-p484。直接安装p484版本。

cd /usr/src
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz
tar zxf ruby-1.9.3-p484.tar.gz
cd ruby-1.9.3-p484
./configure --prefix=/usr/local --disable-install-doc --with-opt-dir=/usr/local/lib
make && make install

然后做一下软连接

-bash: /usr/bin/ruby: No such file or directory

ln -s /usr/local/bin/ruby /usr/bin/ruby

$ /usr/bin/ruby -v  
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

这样在redmine passenger就会调用p484版本。

 

Best Wishes!Any question pls fell free to contact me!

原文地址:https://www.cnblogs.com/wangbaobao/p/7239298.html