`

【转】学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rails等)

    博客分类:
  • ruby
阅读更多

转自:http://www.jb51.net/article/51591.htm

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命令,是指通过RubyGems管理Gem包。

Gemfile

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

Rake

Rake是所有需要安装的Gem中最重要的一个,并且它应该始终是你在系统上第一个安装的Gem。Rake是一个构建工具,和Make很相似,但它允许用Ruby来写Rakefile(如何进行构建的定义文件),其中使用了一种特定的DSL(domain-specific language,领域专用语言),在保持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.

分享到:
评论

相关推荐

    学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rails等)

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

    采用UTF-8解决Ruby on Rails程序的中问题

    1.将.rb文件和.rhtml文件都保存为utf-8格式; 2.在/app/Controller/application.rb中增加... 您可能感兴趣的文章:Ruby rails 页面跳转(render和redirect_to)学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rail

    rails 连接mysql的问题解决

    找不到指定的模块。... 您可能感兴趣的文章:Ruby rails 页面跳转(render和redirect_to)Rails link_to 详解rails常用数据库查询操作、方法浅析学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake,

    deploy_rails:使用Shell脚本通过git更新远程服务器上ruby on rails应用,并执行bundle install、rake db

    使用Shell脚本通过git更新远程服务器上的rails应用,并执行bundle install、rake db:migration、asset precompile和重启unicorn... 尝试使用Capistrano进行部署,但是遇到了很多问题,比如配置错误、ruby版本不匹配...

    ruby-rails-conekta-products:conekta ruby​​ 绑定的示例用法

    你好 Conekta Ruby on Rails Rails 4 应用程序,通过 conekta-ruby 实现支付调用。 此示例使用.ruby-version和.ruby-gemset文件,如果您使用 rb-env 或 rvm,则可以使用后续步骤。 git clone git@github....

    filterrific_demo:Filterrific gem 的演示 Rails 应用程序

    这是 Filterrific gem 的演示 Rails 应用程序。 它还用于将 Filterrific 集成测试到不同版本的 Rails。 我更喜欢在单独的应用程序中测试 Rails Engines,而不是在 Engine gem 中的虚拟应用程序。 如何运行应用程序 ...

    legendary-news:Ruby on Rails教育博客

    此项目需要在ubuntu机器内已安装且可正常运行的滑轨上使用Ruby,才能执行以下步骤: 1-从[这里] [ ]安装用于ruby环境的RVM 2-安装滑轨5.2.4.4 ``` gem install rails -v 5.2.4.4 ``` 3-安装捆绑器 ``` gem ...

    coderie-site:Coderie用户组网站应用程序

    如何引导应用程序 安装 安装了rvm或rbenv 安装Ruby 2.1.x或2.2.x ...bundle exec rails s服务应用程序 bundle exec rake db:reset如果您想重置并重新设置您的数据库 Docker安装 要求 安装步骤 docker-compose build

    Bttendance-Rails

    使用sudo gem install rails -v 4.1.8安装 Rails 4.0+ 设置 Postgres 和 Redis 克隆此存储库后,运行bundle install以安装依赖项。 运行rake bower:install以安装客户端依赖项。 将DATABASE_URL环境变量设置为...

    mind-app:App desenvolvido no Labs da Digital Innovation OneApp ESPECIALISTA

    Ruby 2.7.2 Postegresql 设置 rvm install 2.7.2 rvm use 2.7.2 gem install bundler bundle install rake db:create rake db:migrate rails server 达多斯银行-BD Baixe e instale o PGAdmin: ...

    flights:在 Rails 中处理飞行端点..

    部署说明 (Ubuntu 14.04):使用 Ruby 2.0.0p481(rbenv 而不是 rvm)、Rails 4.1.2、MongoDB 2.6 ~~部署时: 需要将bundle exec whenever --update-crontab map_server作业添加到 crontab( bundle exec whenever...

    Empirical-Cofactor:Cofactor 是我们协作开发互动教育的引擎

    rvm: rvm use 2.1.1 rbenv: rbenv rehash git clone https://github.com/empirical-org/CoFactor.git cd cofactor bundle rake db:migrate rails s故障排除无法安装“pg”包。 要么安装 postgres brew install ...

    aether:位置感知应用程序平台

    一旦你处于正确的 ruby​​ 环境中,你需要安装 rails,如果你还没有这样做的话: gem install rails --version 3.0.9 现在您已准备好开始开发。 首先,安装项目的依赖项: bundle install --binstubs 然后设置...

    friendintown:协作徒步之旅

    =使您的环境运行如果您尚未创建用于开发的gemset,则: rvm --create use 1.9.2@tourious-dev别的rvm use 1.9.2@tourious-dev进入正确的Ruby环境后,如果尚未安装滑轨,则需要安装滑轨: gem install rails --...

    ma-covid-data:马萨诸塞州COVID数据服务

    自述文件CRON乔布斯7 20 * * 4 cd /var/www/ma-covid-data/current && RAILS_ENV=production /home/ma-covid-data/.rvm/gems/ruby-2.7.3/bin/bundle exec rake import:weekly_covid_data[$(date +"\%Y-\%m-\%d")] 2>...

    star-api:所有这些星星都属于你

    RVM,Ruby,捆绑器 开发时使用Sqlite,生产时使用Postgresql ElasticSearch存储搜索元数据 设置Rails API 您需要克隆仓库,运行 bundle install rake db:migrate rake parsers:milkyway:all rake search:rebuild ...

    freak_tags:你一直在看什么?

    统计数据覆盖范围贡献分流贡献者指南-即将发布 让我们运行它 准备环境安装rvm,Ruby(2.2),Rails(4.2),PostgreSQL 进入项目文件夹并运行: bundle rake db:create db:migrate db:seed 问题? 请参阅我们的FAQ....

    opera_webface:歌剧院网页(内含)

    echo "cd path_to_app && source path_to_ruby_dir && rvm use 2.0 do bundle exec rails s -e production -p 80 -d" | sudo bash -i 可以使用root的sudo crontab -e调度此命令。如果要使用端口80,它将在root下...

    vulcan-persistence

    瓦肯人的持久性 ...$ RAILS_ENV=test rake db:create $ RAILS_ENV=test rake db:migrate 通过运行以下命令确保一切正常: $ RAILS_ENV=test rake test Docker执行 这些是您必须使用的变量: 多变的 描述

    git-scm.com:git-scm.com网站。 请注意,此存储库仅用于网站; git本身的问题应转到https:git-scm.comcommunity

    您将需要一个Ruby环境来运行Rails。 首先要做的是: $ rvm use . $ bundle install 然后,您需要创建数据库结构: $ rake db:migrate 或者,您可以在script/bootstrap运行脚本,这将设置Ruby依赖关系和本地SQLite...

Global site tag (gtag.js) - Google Analytics