博客园 - Linux、Mongo、Php、Shell、Python、C
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=18997
2013-03-13T03:15:16Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
feed.cnblogs.com
https://www.cnblogs.com/gongchang/archive/2013/03/13/2957259.html
Java: ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2 DWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/b - Linux、Mongo、Php、Shell、Python、C
java 大学自以为学的很不错的专业课,现在去却做起了php方面的开发,今天突然感觉到java的强大之处,当初没有能好好的理解java的内涵,现在从新拾起自己的本行,从java编程思想开始,从新领悟java,发现工作之后现在对java的理解和大学时期是两个不同的概念,虽然有两年没怎么看过java,但是当把手放到键盘上打开myeclipse,一种熟悉的感觉油然而生,没有半点的生疏之感,好像更加亲近更能好好的去思考编程,流畅之感跃然手上。今天调试第一个错误记录一下,作为纪念利用myeclipse调试含有main函数的类时出现了:ERROR: JDWP Unable to get JNI 1.2 e
2013-03-13T03:15:00Z
2013-03-13T03:15:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】java 大学自以为学的很不错的专业课,现在去却做起了php方面的开发,今天突然感觉到java的强大之处,当初没有能好好的理解java的内涵,现在从新拾起自己的本行,从java编程思想开始,从新领悟java,发现工作之后现在对java的理解和大学时期是两个不同的概念,虽然有两年没怎么看过java,但是当把手放到键盘上打开myeclipse,一种熟悉的感觉油然而生,没有半点的生疏之感,好像更加亲近更能好好的去思考编程,流畅之感跃然手上。今天调试第一个错误记录一下,作为纪念利用myeclipse调试含有main函数的类时出现了:ERROR: JDWP Unable to get JNI 1.2 e <a href="https://www.cnblogs.com/gongchang/archive/2013/03/13/2957259.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/03/11/2954647.html
php设计模式--单例模式 - Linux、Mongo、Php、Shell、Python、C
单例模式(Singleton Pattern)是一个比较简单的模式:确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例实例代码:class Singleton{ private static $singleton = NULL ; private static $count = 0; public static function getInstance(){ if (empty(self::$singleton)){ self::$singleton = new Singleton(); self::$count =+1; } return self::$sin...
2013-03-11T13:11:00Z
2013-03-11T13:11:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】单例模式(Singleton Pattern)是一个比较简单的模式:确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例实例代码:class Singleton{ private static $singleton = NULL ; private static $count = 0; public static function getInstance(){ if (empty(self::$singleton)){ self::$singleton = new Singleton(); self::$count =+1; } return self::$sin... <a href="https://www.cnblogs.com/gongchang/archive/2013/03/11/2954647.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/03/01/2938936.html
mongodb Aggregation Framework 简单记录 - Linux、Mongo、Php、Shell、Python、C
Aggregation Framework参数解析如下:$match: 过滤数据通过设置一个条件将数据进行筛选过滤 db.runCommand({ aggregate : "article", pipeline : [{ $match : { author : "dave" } }]}); $match只是pipeline中的一环,它筛选的结果数据可以再进行下一级的统计操作。$project: 命令用于设定数据的筛选字段,就像我们SQL中select需要的字段一样。 db.runCommand({ aggregate : "article&qu
2013-03-01T08:09:00Z
2013-03-01T08:09:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】Aggregation Framework参数解析如下:$match: 过滤数据通过设置一个条件将数据进行筛选过滤 db.runCommand({ aggregate : "article", pipeline : [{ $match : { author : "dave" } }]}); $match只是pipeline中的一环,它筛选的结果数据可以再进行下一级的统计操作。$project: 命令用于设定数据的筛选字段,就像我们SQL中select需要的字段一样。 db.runCommand({ aggregate : "article&qu <a href="https://www.cnblogs.com/gongchang/archive/2013/03/01/2938936.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/01/28/2880455.html
php 参数命名处理 - Linux、Mongo、Php、Shell、Python、C
//php传递参数的是按照传递参数的顺序来赋值的这就有很容易的造成参数的不对应 要是函数的注释写的又少 就更加容易出现错误//其实可以变换一种方式来传递参数的function test($where,$data){ print($where); print($data);}//其实可以利数组简单的解决这个问题$argArr = array('where'=>$wherevar,"data"=>$datavar);function test($argArr){ print($argArr['where']); print($argA
2013-01-28T12:08:00Z
2013-01-28T12:08:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】//php传递参数的是按照传递参数的顺序来赋值的这就有很容易的造成参数的不对应 要是函数的注释写的又少 就更加容易出现错误//其实可以变换一种方式来传递参数的function test($where,$data){ print($where); print($data);}//其实可以利数组简单的解决这个问题$argArr = array('where'=>$wherevar,"data"=>$datavar);function test($argArr){ print($argArr['where']); print($argA <a href="https://www.cnblogs.com/gongchang/archive/2013/01/28/2880455.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/01/18/2866897.html
RabbitMQ安装测试学习过程简单的记录 - Linux、Mongo、Php、Shell、Python、C
工作快两年了php手册都没有完全的通读过一遍发现自己不知道的东西太多了一定要坚持认真的看完!!!今天接着看php手册是看到消息队列RabbitMQ比较感兴趣 先练练吧1:安装由于RabbitMQ是由Erlang语言开发的首先要安装Erlang下载Erlang安装依赖:Yum install tkYum install tclYum install unixODBC解压./configure –prefix=/usr/local/erlang./make./make install2:下载RabbitMQ ,解压至启动RabbitMQ./bin/rabbitmq-server
2013-01-18T11:15:00Z
2013-01-18T11:15:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】工作快两年了php手册都没有完全的通读过一遍发现自己不知道的东西太多了一定要坚持认真的看完!!!今天接着看php手册是看到消息队列RabbitMQ比较感兴趣 先练练吧1:安装由于RabbitMQ是由Erlang语言开发的首先要安装Erlang下载Erlang安装依赖:Yum install tkYum install tclYum install unixODBC解压./configure –prefix=/usr/local/erlang./make./make install2:下载RabbitMQ ,解压至启动RabbitMQ./bin/rabbitmq-server <a href="https://www.cnblogs.com/gongchang/archive/2013/01/18/2866897.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/01/17/2865065.html
构建一个通用的php验证的函数 - Linux、Mongo、Php、Shell、Python、C
每次处理web应用时特别是写入数据库时,进行数据验证是必须要进行的步骤而且繁琐 每次都要调用很多次,今天闲着没有事情写个通用的函数 ,以后再要验证什么函数,加入自己的函数就可以了 :<?php/** * php 数据过滤扩展 * * 需求:对提交的数据进行过滤要能够通用 * * 1:需要传递的参数是否存在 * 2:需要传递的参数是否合法 * 字段名称 过滤条件 提示信息 * * */class DataFilter extends Exception{ public function __construct(){ } /** * 函数标准说明 * 函数名:filt...
2013-01-17T11:20:00Z
2013-01-17T11:20:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】每次处理web应用时特别是写入数据库时,进行数据验证是必须要进行的步骤而且繁琐 每次都要调用很多次,今天闲着没有事情写个通用的函数 ,以后再要验证什么函数,加入自己的函数就可以了 :<?php/** * php 数据过滤扩展 * * 需求:对提交的数据进行过滤要能够通用 * * 1:需要传递的参数是否存在 * 2:需要传递的参数是否合法 * 字段名称 过滤条件 提示信息 * * */class DataFilter extends Exception{ public function __construct(){ } /** * 函数标准说明 * 函数名:filt... <a href="https://www.cnblogs.com/gongchang/archive/2013/01/17/2865065.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/01/13/2858660.html
Python Linux uswgi 的环境配置简单记录 - Linux、Mongo、Php、Shell、Python、C
在配置之前要安装好对应的nginx和python和django1:下载uwsgi-1.4.4.tar.gz#tar -zxvf uwsgi-1.4.4.tar.gz#cd uwsgi-1.4.4#python setup.py install#cp uwsgi /usr/bin/# cd nginx/#cp uwsgi_param /usr/local/nginx/conf2:配置nginx 如下: server{ listen 80; server_name python.ch.gongchang.cn; access_log /var/log/python/access.log; erro
2013-01-13T10:14:00Z
2013-01-13T10:14:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】在配置之前要安装好对应的nginx和python和django1:下载uwsgi-1.4.4.tar.gz#tar -zxvf uwsgi-1.4.4.tar.gz#cd uwsgi-1.4.4#python setup.py install#cp uwsgi /usr/bin/# cd nginx/#cp uwsgi_param /usr/local/nginx/conf2:配置nginx 如下: server{ listen 80; server_name python.ch.gongchang.cn; access_log /var/log/python/access.log; erro <a href="https://www.cnblogs.com/gongchang/archive/2013/01/13/2858660.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2013/01/10/2855391.html
Forbidden (403) CSRF verification failed. Request aborted. - Linux、Mongo、Php、Shell、Python、C
The CSRF middleware and template tag provides easy-to-use protection against Cross Site Request Forgeries. 跨站请求伪造,django 1.4 默认配置了’django.middleware.csrf.CsrfViewMiddleware’,MIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware','django.contrib.sessions.middleware.SessionMiddl
2013-01-10T12:55:00Z
2013-01-10T12:55:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】The CSRF middleware and template tag provides easy-to-use protection against Cross Site Request Forgeries. 跨站请求伪造,django 1.4 默认配置了’django.middleware.csrf.CsrfViewMiddleware’,MIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware','django.contrib.sessions.middleware.SessionMiddl <a href="https://www.cnblogs.com/gongchang/archive/2013/01/10/2855391.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/12/28/2837430.html
Python ImportError: cannot import name * - Linux、Mongo、Php、Shell、Python、C
[root@company ~]# python /root/workspace/python/test/urllib.pyTraceback (most recent call last): File "/root/workspace/python/test/urllib.py", line 5, in <module> from urllib2 import urlopen File "/usr/lib/python2.6/urllib2.py", line 111, in <module> from urllib impor
2012-12-28T07:44:00Z
2012-12-28T07:44:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】[root@company ~]# python /root/workspace/python/test/urllib.pyTraceback (most recent call last): File "/root/workspace/python/test/urllib.py", line 5, in <module> from urllib2 import urlopen File "/usr/lib/python2.6/urllib2.py", line 111, in <module> from urllib impor <a href="https://www.cnblogs.com/gongchang/archive/2012/12/28/2837430.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/12/14/2817813.html
数据结构:线性表 - Linux、Mongo、Php、Shell、Python、C
1:数据元素由若干个数据项组成,常把数据元素称为记录,含有大量记录的线性表又称为文件。
2012-12-14T04:22:00Z
2012-12-14T04:22:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】1:数据元素由若干个数据项组成,常把数据元素称为记录,含有大量记录的线性表又称为文件。 <a href="https://www.cnblogs.com/gongchang/archive/2012/12/14/2817813.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/12/13/2816963.html
C和指针自己的理解记录 - Linux、Mongo、Php、Shell、Python、C
1:const int n=5;int const m=10;上述两个变量n和m其实是同一种类型的??都是const int(整形恒量)。因为C 标准规定,const要害字放在类型或变量名之前等价的2:const int *p;//const int 类型的指针 不能通过*p修改去变量的值int const *q;//但是q p的指针内容可以修改3:int类型的const指针应该这样声明:int * const r= &n; //*r的值可以改变 r不可改变4:“右左法则”是一个简单的法则,但能让你准确理解所有的声明。这个法则运用如下:从最内部的括号开始阅读声明,向右看,然后向左看。当
2012-12-13T11:50:00Z
2012-12-13T11:50:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】1:const int n=5;int const m=10;上述两个变量n和m其实是同一种类型的??都是const int(整形恒量)。因为C 标准规定,const要害字放在类型或变量名之前等价的2:const int *p;//const int 类型的指针 不能通过*p修改去变量的值int const *q;//但是q p的指针内容可以修改3:int类型的const指针应该这样声明:int * const r= &n; //*r的值可以改变 r不可改变4:“右左法则”是一个简单的法则,但能让你准确理解所有的声明。这个法则运用如下:从最内部的括号开始阅读声明,向右看,然后向左看。当 <a href="https://www.cnblogs.com/gongchang/archive/2012/12/13/2816963.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/12/07/2807827.html
MongoDB 2.2 Time To Live --TTL集合 - Linux、Mongo、Php、Shell、Python、C
MongoDB 2.2 新特性:TTL 集合,TTL 集合支持失效时间设置,当超过指定时间后,集合自动清除超时的文档,这用来保存一些诸如session会话信息的时候非常有用,或者存储缓存数据使用。
2012-12-07T11:54:00Z
2012-12-07T11:54:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】MongoDB 2.2 新特性:TTL 集合,TTL 集合支持失效时间设置,当超过指定时间后,集合自动清除超时的文档,这用来保存一些诸如session会话信息的时候非常有用,或者存储缓存数据使用。 <a href="https://www.cnblogs.com/gongchang/archive/2012/12/07/2807827.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/29/2795207.html
Ruby gem install mysql 错误解决 - Linux、Mongo、Php、Shell、Python、C
利用gem安装mysql时的错误:[root@company ruby]# gem install mysqlBuilding native extensions. This could take a while...ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rbmkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.hGem files will remain i
2012-11-29T12:01:00Z
2012-11-29T12:01:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】利用gem安装mysql时的错误:[root@company ruby]# gem install mysqlBuilding native extensions. This could take a while...ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rbmkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.hGem files will remain i <a href="https://www.cnblogs.com/gongchang/archive/2012/11/29/2795207.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/27/2791268.html
Redis 主从配置的出现的错误 - Linux、Mongo、Php、Shell、Python、C
[4400] 27 Nov 18:09:05 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.依照提示修改
2012-11-27T10:17:00Z
2012-11-27T10:17:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】[4400] 27 Nov 18:09:05 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.依照提示修改 <a href="https://www.cnblogs.com/gongchang/archive/2012/11/27/2791268.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/25/2787711.html
Ruby 项目和程序库 - Linux、Mongo、Php、Shell、Python、C
Ruby是一中动态语言,可以覆写现有方法和类 !require 把外部文件载入到当前的程序中。load 代码每次载入时都被重新处理被包含的搜索路径: $:是个数组 $:.each {|d| puts} 增加自己的路径:$:.push '/usr/local/' 程序库(library): 是指可被其他程序调用、且独立存在的例程集合。
2012-11-25T09:09:00Z
2012-11-25T09:09:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】Ruby是一中动态语言,可以覆写现有方法和类 !require 把外部文件载入到当前的程序中。load 代码每次载入时都被重新处理被包含的搜索路径: $:是个数组 $:.each {|d| puts} 增加自己的路径:$:.push '/usr/local/' 程序库(library): 是指可被其他程序调用、且独立存在的例程集合。 <a href="https://www.cnblogs.com/gongchang/archive/2012/11/25/2787711.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/25/2787394.html
Ruby 第二篇 Ruby的构造元素:数据、表达式和 - Linux、Mongo、Php、Shell、Python、C
1:数字与表达式 变量是对象的占位符或者是引用2:比较运算符:age = 10 puts "You are age too young" if age < 18 puts "You are age too young" unless age < 18 循环:5.times do puts "Test" end <=> 5.times {puts "Test"}#从1到5 将数字顺着滑道 传送给 number变量3:浮点数x = 3y = 3.6 x.to_f y.to_i4:常量大写字母开头
2012-11-25T05:33:00Z
2012-11-25T05:33:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】1:数字与表达式 变量是对象的占位符或者是引用2:比较运算符:age = 10 puts "You are age too young" if age < 18 puts "You are age too young" unless age < 18 循环:5.times do puts "Test" end <=> 5.times {puts "Test"}#从1到5 将数字顺着滑道 传送给 number变量3:浮点数x = 3y = 3.6 x.to_f y.to_i4:常量大写字母开头 <a href="https://www.cnblogs.com/gongchang/archive/2012/11/25/2787394.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/25/2787352.html
Ruby 第一篇 基础和脚手架 知识点 - Linux、Mongo、Php、Shell、Python、C
1:Ruby是个面向对象的编程语言,Ruby中一切皆为对象。2: 类的简单介绍classPetattr_accessor:name,:age,:gener #三个可访问的属性endpet = Pet.new #创建个对象 class Cat <Pet #继承 attr_accessor:length #新的属性 def bark #方法 puts "Woof!" endend 3:attr.class #获取attr的所属类的名称 Kernel 特殊的类 :irb(main):006:0> Kernel.instance_methods=> ["
2012-11-25T03:27:00Z
2012-11-25T03:27:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】1:Ruby是个面向对象的编程语言,Ruby中一切皆为对象。2: 类的简单介绍classPetattr_accessor:name,:age,:gener #三个可访问的属性endpet = Pet.new #创建个对象 class Cat <Pet #继承 attr_accessor:length #新的属性 def bark #方法 puts "Woof!" endend 3:attr.class #获取attr的所属类的名称 Kernel 特殊的类 :irb(main):006:0> Kernel.instance_methods=> [" <a href="https://www.cnblogs.com/gongchang/archive/2012/11/25/2787352.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/24/2785604.html
Ruby关于类一些简单记录 - Linux、Mongo、Php、Shell、Python、C
[root@companyruby]#vimruby.rb#!/usr/bin/envrubyclassGreeterattr_accessor:namedefinitialize(name="HelloWorld")@name=name;enddefsay_hi(age="36")puts"Hi#{@name}#{age}!"enddefsay_byeputs"Bye#{@name},comebacksoon"endendg=Greeter.new("Pat")g.say_hi(36)g.sa
2012-11-24T03:55:00Z
2012-11-24T03:55:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】[root@companyruby]#vimruby.rb#!/usr/bin/envrubyclassGreeterattr_accessor:namedefinitialize(name="HelloWorld")@name=name;enddefsay_hi(age="36")puts"Hi#{@name}#{age}!"enddefsay_byeputs"Bye#{@name},comebacksoon"endendg=Greeter.new("Pat")g.say_hi(36)g.sa <a href="https://www.cnblogs.com/gongchang/archive/2012/11/24/2785604.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/23/2784709.html
Ruby中print,puts,p的区别 - Linux、Mongo、Php、Shell、Python、C
Ruby中打印信息的方法一般有print,puts,p等。它们的区别如何?下面的例子就可以说得很清楚: irb(main):001:0>puts"a","\nb"ab=>nilirb(main):002:0>p"a","\nb""a""\nb"=>nilirb(main):003:0>print"a","\nb"ab=>nilputs会识别双引号""内的转义符,每打印一串信息,在结
2012-11-23T08:47:00Z
2012-11-23T08:47:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】Ruby中打印信息的方法一般有print,puts,p等。它们的区别如何?下面的例子就可以说得很清楚: irb(main):001:0>puts"a","\nb"ab=>nilirb(main):002:0>p"a","\nb""a""\nb"=>nilirb(main):003:0>print"a","\nb"ab=>nilputs会识别双引号""内的转义符,每打印一串信息,在结 <a href="https://www.cnblogs.com/gongchang/archive/2012/11/23/2784709.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/gongchang/archive/2012/11/23/2783882.html
Rugy 茶余饭后 - Linux、Mongo、Php、Shell、Python、C
茶语饭后学习下Ruby这个听说很nx的语言和Ruby on rails 框架。限于开发环境为Linux简单安装yum install rubyruby -v 测试成功找不到 irb然后接着安装 irbyum install irb>irb irb "交互式ruby"的缩写正确运行!
2012-11-23T01:57:00Z
2012-11-23T01:57:00Z
Linux、Mongo、Php、Shell、Python、C
https://www.cnblogs.com/gongchang/
【摘要】茶语饭后学习下Ruby这个听说很nx的语言和Ruby on rails 框架。限于开发环境为Linux简单安装yum install rubyruby -v 测试成功找不到 irb然后接着安装 irbyum install irb>irb irb "交互式ruby"的缩写正确运行! <a href="https://www.cnblogs.com/gongchang/archive/2012/11/23/2783882.html" target="_blank">阅读全文</a>