如何在debian lenny上安装ruby 1.9.2?

我想在我的debian lenny服务器上安装最新的ruby和rails.

我发现包http://packages.debian.org/lenny-backports/ruby1.9.1-full,但是当我尝试安装它,我只是得到:

atlas:~# apt-get install ruby1.9.1-full
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package ruby1.9.1-full

我的sources.list如下所示:

atlas:~# cat /etc/apt/sources.list

deb http://ftp.se.debian.org/debian/ lenny main non-free contrib
deb-src http://ftp.se.debian.org/debian/ lenny main non-free contrib

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

要做什么来安装它?

解决方法

停止.回去.安装Ruby Debian的任何版本,大概是1.8.7或1.8.7.然后安装RVM.我有一些 using RVM with Ubuntu的方向(对不起,不是Debian,但是很接近).严重的是,RVM使得安装任何版本的Ruby很容易.然后,使用RVM安装Ruby 1.9.2,你不需要1.9.1.

这将根据您想要使用Ruby的方式工作.为了开发目的,使用RVM的工作真的很好.对于服务器目的,我想可以使用它,但是您可能会遇到一些问题.我认为RVM为您提供了一些可用于使用init脚本和cron作业运行Ruby脚本的脚本.

或者,您可以从源安装.这不是很难,而不是debian的方式,但它会完成这项工作.这可能更适合安装一些第三方软件包,您可能不知道在编译期间做了什么,以及如何在安全漏洞的情况下获得快速更新.使用RVM或从源手动安装,您可以随时更新.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...