Total Pageviews

Wednesday, 1 January 2014

用Bundler更方便的安装某个gem

Bundler: a gem to bundle gems

Bundler keeps ruby applications running the same code on every machine.
It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.

Installation and usage

gem install bundler
bundle init
echo "gem 'rails'" >> Gemfile  ( 编辑你的某个ruby程序包中的Gemfile文件)
bundle install    (通过这2步,就可装好rails这个gem)
bundle exec rails new myapp
See bundler.io for the full documentation.

from https://github.com/bundler/bundler