整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)
来源:互联网 发布:北京文森特软件科技 编辑:程序博客网 时间:2024/05/24 02:40
最近在看一个Rails项目,渐渐的接触到Ruby语言,其中有些概念之前比较混乱,模棱两可,相信也有人跟我一样,刚开始学ruby时对这些概念不太清晰,现在整理一下。
Ruby
这个就不用多说了
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通常是依照“.gemspec”文件构建的,其为包含了有关Gem信息的YAML文件。
注:在终端使用的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.
学习资料来源于:
https://github.com/henter/henter.github.com/blob/master/_posts/2013-03-30-ruby-rvm-gem-rake-bundle-rails.md
- 整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)
- 整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)
- 学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rails等)
- Self summary: Ruby(RVM, gem, bundle)
- Ruby的头号Gem:Rake
- Ruby的头号Gem:Rake
- [转]Ruby的头号Gem:Rake
- Gem/Bundle/Rvm
- Gem/Bundle/Rvm
- Gem gem,rvm,bundle 区别?
- iOS开发笔记之四十八——gem、brew、rvm、bundle的相关介绍
- ruby gem rails 的关系
- Ruby on Rails 入门之:(1) Ruby, Rails, gem, bundler相关软件的安装
- Ruby on Rails,rake工具使用和数据库migrations迁移的概念
- Ruby / Rails, RVM
- rvm,gems,rubygems,bundle,gemfile,git,rake
- gem,bundle in rails
- 关于cloud_foundry自己的ruby, gem, bundle
- 【翻译】Tweepy 3.5.0 Doc (3) Code Snippets
- CF Round #358 D
- leecode_324 Wiggle Sort II
- State bank of India Shimla Himachal Pradesh Ifsc Codes
- Android 播放视频并获取指定时间的帧画面
- 整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)
- Caffe小玩意(2)-从caffemodel中导出参数
- 运维中的一些概念scale-in/scale-out/scale-up/scale-down/auto-scaling
- Maximum Product Subarray
- leetcode #105 in cpp
- 简单的java代码在内存加载过程(详解)
- android 获取网络视频缩略图
- Android之使用MediaMetadataRetriever类获取视频第一帧及用法
- leetcode #106 in cpp