- 浏览: 58420 次
- 性别:
- 来自: 深圳
最新评论
Rails3里多了个Bundler工具。
它是一个Library管理工具,它提供了好的工具来管理你rails3项目依赖的gems。
$> bundle
这个命令会列出bundler提供给你的一些工具。
Tasks:
bundle check # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems
bundle exec # Run the command in context of the bundle
bundle help [TASK] # Describe available tasks or one specific task
bundle init # Generates a Gemfile into the current working directory
bundle install # Install the current environment to the system
bundle lock # Locks the bundle to the current set of dependencies, including all child dependencies.
bundle pack # Packs all the gems to vendor/cache
bundle show # Shows all gems that are part of the bundle.
bundle unlock # Unlock the bundle. This allows gem versions to be changed
你只要在你的Gemfile文件里添加你项目所需的gems就可以了。
$> bundle pack
这个命令可以打包你的gems到vendor/cache目录下。然后你把项目给别的开发者,别人就可以使用:
$> bundle install
来安装项目依赖的gems了。
但是当你想把项目部署到生产环境的话,假如gems出现新版本,可能导致项目出现错误,这个时候,我们就需要锁定gem的版本。
$> bundle lock
这个命令会在rails的根目录下生成一个Gemfile.lock文件。类似于这样的:
---
dependencies:
- rails: = 3.0.0.beta
- sqlite3-ruby: ">= 0"
- pg: ">= 0"
specs:
- text-hyphen:
version: 1.0.0
- builder:
version: 2.1.2
- i18n:
version: 0.3.3
当你在Gemfile文件里增加了一个新的gem,比如“hpricot”你运行:
$> bundle check
You changed your Gemfile after locking. Please relock using `bundle unlock`
想修改Gemfile必须先解锁Gemfile文件:
$> bundle unlock
然后才能修改,修改完再锁定。
$> bundle install
这条命令会自动安装Gemfile里的所有gem。
然后我们再检测:
$>bundle check
The Gemfile's dependencies are satisfied
这就安全了。
然后我们可以打包了:
$> bundle pack
Copying .gem files into vendor/cache
...
打包完以后,锁定我们的gems:
$> bundle lock
这下你就可以安全部署你的app了。
转自:http://www.cnblogs.com/orez88/articles/1852286.html
gem的写法可以具体参照:http://github.com/carlhuda/bundler
Bundler官网:http://gembundler.com
它是一个Library管理工具,它提供了好的工具来管理你rails3项目依赖的gems。
$> bundle
这个命令会列出bundler提供给你的一些工具。
Tasks:
bundle check # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems
bundle exec # Run the command in context of the bundle
bundle help [TASK] # Describe available tasks or one specific task
bundle init # Generates a Gemfile into the current working directory
bundle install # Install the current environment to the system
bundle lock # Locks the bundle to the current set of dependencies, including all child dependencies.
bundle pack # Packs all the gems to vendor/cache
bundle show # Shows all gems that are part of the bundle.
bundle unlock # Unlock the bundle. This allows gem versions to be changed
你只要在你的Gemfile文件里添加你项目所需的gems就可以了。
$> bundle pack
这个命令可以打包你的gems到vendor/cache目录下。然后你把项目给别的开发者,别人就可以使用:
$> bundle install
来安装项目依赖的gems了。
但是当你想把项目部署到生产环境的话,假如gems出现新版本,可能导致项目出现错误,这个时候,我们就需要锁定gem的版本。
$> bundle lock
这个命令会在rails的根目录下生成一个Gemfile.lock文件。类似于这样的:
---
dependencies:
- rails: = 3.0.0.beta
- sqlite3-ruby: ">= 0"
- pg: ">= 0"
specs:
- text-hyphen:
version: 1.0.0
- builder:
version: 2.1.2
- i18n:
version: 0.3.3
当你在Gemfile文件里增加了一个新的gem,比如“hpricot”你运行:
$> bundle check
You changed your Gemfile after locking. Please relock using `bundle unlock`
想修改Gemfile必须先解锁Gemfile文件:
$> bundle unlock
然后才能修改,修改完再锁定。
$> bundle install
这条命令会自动安装Gemfile里的所有gem。
然后我们再检测:
$>bundle check
The Gemfile's dependencies are satisfied
这就安全了。
然后我们可以打包了:
$> bundle pack
Copying .gem files into vendor/cache
...
打包完以后,锁定我们的gems:
$> bundle lock
这下你就可以安全部署你的app了。
转自:http://www.cnblogs.com/orez88/articles/1852286.html
gem的写法可以具体参照:http://github.com/carlhuda/bundler
Bundler官网:http://gembundler.com
发表评论
-
Diaspora 功能特性列表
2013-05-10 14:25 980Diaspora Function Features List ... -
rails scaffold getting the column list from existing table
2011-09-23 10:02 882之前一直找这个问题的解决办法,但一直没找到,在g上看到了一个人 ... -
ruby语法-传值
2011-08-23 16:49 1020=begin def test1(*a) p a.firs ... -
Rails 3 用 JQuery 替代 Prototype
2011-07-28 22:48 10981.进入到工程目录中修改Gemfile文件,加入如下行: g ... -
Generate a list of Rails controllers and methods
2011-07-01 17:40 823列出项目中的controler和他对应的actions: @c ... -
Ubuntu手动安装JDK
2011-05-20 16:03 539Ubuntu手动安装JDK 安装前可以查看一下jdk版本,进 ... -
研究小计1
2011-04-20 00:55 631有时候对一些基础的东西,不知道它的边界在哪里,其实做些小实验就 ... -
RubyGem version error: rack(1.0.0 not ~> 1.0.1)
2011-04-17 00:09 1327I have this error when I try to ... -
rubyonrails Restful Authentication 插件
2011-04-17 00:01 781restful_authentication是Rails的一个 ... -
XP.CMD命令大全
2011-04-17 00:00 610有关某个命令的详细信 ... -
几个有用的方法
2011-04-16 23:58 558hash.invert Returns a new hash ... -
Firefox键盘快捷方式
2011-04-16 23:55 1185Firefox键盘快捷方式 键盘快捷健 下面是 Mozil ... -
Ubuntu手动安装JDK
2011-04-16 23:53 708Ubuntu手动安装JDK 安装前可以查看一下jdk版本,进 ... -
字符转时间格式转换成时间对象
2011-04-16 23:52 718Time.parse("Wed, 23 Jan 20 ... -
使用Rails时遇到了服务器启动问题 script/server:3
2011-04-16 23:47 1261境 Windows Vista Home Premium c ... -
DoDirectPayment
2011-04-16 23:44 971DoDirectPayment 1. DoDirectPay ... -
Rails异常处理
2011-04-16 23:43 944异常处理是开发过程中 ... -
ruby和rails中的回调函数
2011-04-16 23:41 1852Ruby中Class,Object,Module这三个类定义了 ... -
深入理解alias, alias_method和alias_method_chain
2011-04-16 23:41 853对 于alias, alias_method, alias_m ... -
Rails3:使用bundler管理gems
2011-04-16 23:39 1368bundler是一套为了 Rails3 所打造的全新 Gem ...
相关推荐
bundler-site, Bundler文档网站 bundler.iobundler.io 旨在作为文档的一个方便来源,在 bundler gem 。站点 bundler.io 是一个 static 站点,使用中间生成。本文档的主要功能和功能是站点的重要部分。 他们是通过 。...
本人纯手打,对三维重建程序Bundler内的主要函数结构、算法原理、参考文献和文件格式做了仔细说明。希望对大家有所帮助。
前端开源库-lib-bundlerlib bundler,lib bundler是一个代码bundler,用于绑定ES6编写的JS lib。
三维重建算法bundler编译和运行的详细说明
bundler-1.0.21.gembundler-1.0.21.gembundler-1.0.21.gembundler-1.0.21.gem
bundler源代码
Bundler -编译和压缩 Less/Sass/Stylus/Css/JS/CoffeeScript/LiveScript文件。集成MVC和ServiceStack
前端开源库-gulp-amd-bundler吞下和邦德勒,使一个AMD模具和它的相对依赖的模具成一个文件。
关于bundler 编译帮助文档,以及bundler源代码和编译结果.
比较详细的英文bundler说明文档,欢迎下载和交流
vue新建项目出现问题 替换这个文件
Bundler是一个采用C和C++开发的称为sfm(struct-from-motion)的系统,它能够利用无序的图片集合(例如来自网络的图片)重建出3D的模型。Bundler的输入是一些图像、图像特征以及图像匹配信息,输出则是一个根据这些...
Bundler使用Ruby语言写的,通过跟踪和安装运行Ruby项目所需要的确切的gem和版本,为Ruby项目提供了完整的可运行环境。Bundler跳出了复杂的环境依赖,并且确保下载你在development, staging, and productionBundler这...
bundler SFM 代码 ,实现图像三维重建
Bundler+CMVS-PMVS 打包下载
bundler-v0.3-binary工具开发应用
redux-bundler-react redux-bundler与React的绑定安装npm install redux-bundler-react示例/文档与类似,它有两个输出Provider和connect 。 Provider将商店放入context以便连接的组件可以访问它: import { connect ...
最新版的bundler,可以在windows下面通过cygwin运行,也可以用vs2013运行、调试。
VS2010环境下编译的Bundler,修正了源代码中的一些bug,参考文献http://blog.csdn.net/chlele0105/article/details/9120729,源代码地址http://www.cs.cornell.edu/~snavely/bundler/,已在cygwin环境下测试通过。
最近学习bundler、cmvs、pmvs,发现都是linux版本,好的配置的东西,用了三个月将其改为windows版,直接运行exe_imageTo3D即可。