DevKit介绍和安装in railsInstaller

DevKit介绍和安装in railsInstaller 

---------------下面是github上的描述---------

简要

DevKit可用于编译那些gem提供的c或c++的源代码。它本身被编译为了exe,安装的时候会找到ruby的目录,然后修改添加一些文件。这样,在安装那些需要编译的gem时,就直接搞定了。

详细的描述,可参考Development Kit。

下面把这里的安装步骤说一下:

1、先解压

2、执行ruby dk.rb init    及  ruby dk.rb install

3、然后测试一下

安装需要再编译的gem:json ==> gem install json --platform=ruby

==>ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect"

如果打印[42]就OK!

 

#其实安装railsinstaller的时候选中对应的选项就没事了,自动安装好了。额的神啊win平台。

 

官网

See:http://rubyinstaller.org/add-ons/devkit/ Meet DevKit

Sometimes you just want RubyGems to build that cool native, C-based extension without squawking. Who’s your buddy? The DevKit that’s who!

DEVKIT OVERVIEW

The RubyInstaller Development Kit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows.

Simply download, double-click, choose an installation directory, run the Ruby install helper script and you’re ready to start using native Ruby extensions. For installation details check out theDevelopment Kit wiki page.

====

参考here:http://huihuilou.iteye.com/blog/2006479 Devkit安装

windows下通过执行bundle install命令来安装java-buildpack时,CMD下提示下面的错误信息,大概是一个叫Devkit的东西没有安装,需要安装它才行。

在rubyinstaller的官网上有这个软件的下载,URL。下面,针对这个软件及github上关于此的一篇文章,我将进行摘要翻译。

首先,在下载的地方对Devkit有这样的描述:

The RubyInstaller Development Kit (DevKit) is a MSYS/MinGW based toolkit than enables you to build many of the native C/C++ extensions available for Ruby.

--这里提到了MSYS/MinGW两个概念,有文章讲这个不错:Gcc/MinGW/Cygwin/Msys 分别是什么?

简单来讲,它的意思是:DevKit基于MSYS/MinGW编译模块,有了它,我们就不需要自己去编译那些C/C++的扩展源代码,编译出的程序可Ruby调用。

 

 

8

8

8

-

8

8

8

猜你喜欢

转载自fantaxy025025.iteye.com/blog/2214511