打开cmd,进入DevKit的解压目录
ruby dk.rb
---
Configures an MSYS/MinGW based Development Kit (DevKit) for
each of the Ruby installations on your Windows system. The
DevKit enables you to build many of the available native
RubyGems that don't yet have a binary gem.
Usage: ruby dk.rb COMMAND [options]
where COMMAND is one of:
init prepare DevKit for installation
review review DevKit install plan
install install required DevKit executables
and 'install' [options] are:
-f, --force overwrite existing helper scripts
-------------
ruby dk.rb init
---
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
--------------------------------
ruby dk.rb install
---
Invalid configuration or no Rubies listed. Please fix 'config.yml'
and rerun 'ruby dk.rb install'
如果出现的是这个,则需要修改config.yml
加入
- C:\Ruby200-x64
---
[INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'
[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'
这是对的
---------------------
gem install ruby-debug-ide
---
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed ruby-debug-ide-0.4.17
Parsing documentation for ruby-debug-ide-0.4.17
Installing ri documentation for ruby-debug-ide-0.4.17
1 gem installed
ruby的汉语意思如下:
n.
红宝石深红色。
adj.
红宝石的红宝石色的。
ruby的读音是:英 [ˈruːbi] 美 [ˈruːbi] 。
ruby的造句如下:
1、RDT is a far more full-featured Ruby IDE with a ton of exciting and time-saving options.
RDT是一个功能更为完善的Ruby开发环境,具备许多令人兴奋并且可以节省大量开发时间的选项。
2、Rich ruby color with tastes of black cherry, full plum and soft vanilla and toffee notes.
酒体呈漂亮的宝石红色,富含蓝莓和熟李子的果香,以及优雅的香草及太妃糖香气。
3、Download and install Ruby libraries easily.
容易地下载和安装ruby库。
4、Tasting notes: A bright ruby red colour with attractive purple hues.
品酿笔记:酒泽如红宝石般明亮动人,但又透露著 * 紫色于其中。
5、Deep ruby coloured with purple reflections in the first years and tending to orange when older.
深宝石红,年轻时泛紫色边缘,随着时间变化会慢慢转成橘黄色。
6、The origin of Ruby Fall.
红宝石瀑布的起源.
在使用Cookie.find等操作的时候,就会连接到database.yml中monitor_spider配置的数据库上操作。以前一直都这么用,没发现什么不妥。最近一个项目,由于启动的进程比较多,老是碰到数据库连接池链接获取超时的错误。通过MySQL Client用命令:show processlist发现数据库连接数量一直居高不下,轻轻松松就上2k+的连接。通过读Rails框架的connection_pool.rb文件代码,发现在各模型中用establish_connection连接数据库会造成很大的问题。文件中类ConnectionHandler的establish_connection方法代码如下:Ruby代码 def establish_connection(name, spec) @connection_pools[name] = ConnectionAdapters::ConnectionPool.new(spec) end def establish_connection(name, spec)
@connection_pools[name] = ConnectionAdapters::ConnectionPool.new(spec)