整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)

RVM
用于帮你安装Ruby环境,帮你管理多个Ruby环境,帮你管理你开发的每个Ruby应用使用机器上哪个Ruby环境。Ruby环境不仅仅是Ruby本身,还包括依赖的第三方Ruby插件。都由RVM管理。

Rails
这个也不用多说,著名开发框架。详细看 http://zh.wikipedia.org/wiki/Ruby_on_Rails

RubyGems
RubyGems是一个方便而强大的Ruby程序包管理器( package manager),类似RedHat的RPM.它将一个Ruby应用程序打包到一个gem里,作为一个安装单元。无需安装,最新的Ruby版本已经包含RubyGems了。

Gem
Gem是封装起来的Ruby应用程序或代码库。

注:在终端使用的gem命令,是指通过RubyGems管理Gem包。

Gemfile
定义你的应用依赖哪些第三方包,bundle根据该配置去寻找这些包。

Rake
Rake是一门构建语言,和make类似。Rake是用Ruby写的,它支持自己的DSL用来处理和维护Ruby程序。 Rails用rake扩展来完成多种不容任务,如数据库初始化、更新等。

Rake is a build language, similar in purpose to make and ant. Like make and ant it’s a Domain Specific Language, unlike those two it’s an internal DSL programmed in the Ruby language.
PS:个人感觉有点类似Symfony2中的app/console

详细 http://rake.rubyforge.org/

Rakefile
Rakefile是由Ruby编写,Rake的命令执行就是由Rakefile文件定义。

In a gem’s context, the Rakefile is extremely useful. It can hold various tasks to help building, testing and debugging your gem, among all other things that you might find useful.
详细:http://rake.rubyforge.org/files/doc/rakefile_rdoc.html

Bundle
相当于多个RubyGems批处理运行。在配置文件gemfilel里说明你的应用依赖哪些第三方包,他自动帮你下载安装多个包,并且会下载这些包依赖的包。

Bundler maintains a consistent environment for ruby applications. It tracks an application’s code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值