GEMFILE(5) GEMFILE(5)
1mNAME0m
1mGemfile 22m- A format for describing gem dependencies for Ruby programs
1mSYNOPSIS0m
A 1mGemfile 22mdescribes the gem dependencies required to execute associated
Ruby code.
Place the 1mGemfile 22min the root of the directory containing the associ-
ated code. For instance, in a Rails application, place the 1mGemfile 22min
the same directory as the 1mRakefile22m.
1mSYNTAX0m
A 1mGemfile 22mis evaluated as Ruby code, in a context which makes available
a number of methods used to describe the gem requirements.
1mGLOBAL SOURCES0m
At the top of the 1mGemfile22m, add a line for the 1mRubygems 22msource that con-
tains the gems listed in the 1mGemfile22m.
source "https://rubygems.org"
It is possible, but not recommended as of Bundler 1.7, to add multiple
global 1msource 22mlines. Each of these 1msource22ms 1mMUST 22mbe a valid Rubygems
repository.
Sources are checked for gems following the heuristics described in
4mSOURCE24m 4mPRIORITY24m. If a gem is found in more than one global source,
Bundler will print a warning after installing the gem indicating which
source was used, and listing the other sources where the gem is avail-
able. A specific source can be selected for gems that need to use a
non-standard repository, suppressing this warning, by using the 1m:source0m
option or a 1msource 22mblock.
1mCREDENTIALS0m
Some gem sources require a username and password. Use bundle config(1)
4mbundle-config.1.html24m to set the username and password for any of the
sources that need it. The command must be run once on each computer
that will install the Gemfile, but this keeps the credentials from
being stored in plain text in version control.
bundle config gems.example.com user:password
For some sources, like a company Gemfury account, it may be easier to
include the credentials in the Gemfile as part of the source URL.
source "https://user:password@gems.example.com"
Credentials in the source URL will take precedence over credentials set
using 1mconfig22m.
1mRUBY0m
If your application requires a specific Ruby version or engine, specify
your requirements using the 1mruby 22mmethod, with the following arguments.
All parameters are 1mOPTIONAL 22munless otherwise specified.
1mVERSION (required)0m
The version of Ruby that your application requires. If your application
requires an alternate Ruby engine, such as JRuby, Rubinius or Truf-
fleRuby, this should be the Ruby version that the engine is compatible
with.
ruby "1.9.3"
1mENGINE0m
Each application 4mmay24m specify a Ruby engine. If an engine is specified,
an engine version 4mmust24m also be specified.
What exactly is an Engine? - A Ruby engine is an implementation of the
Ruby language.
o For background: the reference or original implementation of the
Ruby programming language is called Matz's Ruby Interpreter
4mhttps://en.wikipedia.org/wiki/Ruby_MRI24m, or MRI for short. This is
named after Ruby creator Yukihiro Matsumoto, also known as Matz.
MRI is also known as CRuby, because it is written in C. MRI is the
most widely used Ruby engine.
o Other implementations 4mhttps://www.ruby-lang.org/en/about/24m of Ruby
exist. Some of the more well-known implementations include Rubinius
4mhttps://rubinius.com/24m, and JRuby 4mhttp://jruby.org/24m. Rubinius is an
alternative implementation of Ruby written in Ruby. JRuby is an
implementation of Ruby on the JVM, short for Java Virtual Machine.
1mENGINE VERSION0m
Each application 4mmay24m specify a Ruby engine version. If an engine ver-
sion is specified, an engine 4mmust24m also be specified. If the engine is
"ruby" the engine version specified 4mmust24m match the Ruby version.
ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
1mPATCHLEVEL0m
Each application 4mmay24m specify a Ruby patchlevel.
ruby "2.0.0", :patchlevel => "247"
1mGEMS0m
Specify gem requirements using the 1mgem 22mmethod, with the following argu-
ments. All parameters are 1mOPTIONAL 22munless otherwise specified.
1mNAME (required)0m
For each gem requirement, list a single 4mgem24m line.
gem "nokogiri"
1mVERSION0m
Each 4mgem24m 1mMAY 22mhave one or more version specifiers.
gem "nokogiri", ">= 1.4.2"
gem "RedCloth", ">= 4.1.0", "< 4.2.0"
1mREQUIRE AS0m
Each 4mgem24m 1mMAY 22mspecify files that should be used when autorequiring via
1mBundler.require22m. You may pass an array with multiple files or 1mtrue 22mif
file you want 1mrequired 22mhas same name as 4mgem24m or 1mfalse 22mto prevent any
file from being autorequired.
gem "redis", :require => ["redis/connection/hiredis", "redis"]
gem "webmock", :require => false
gem "debugger", :require => true
The argument defaults to the name of the gem. For example, these are
identical:
gem "nokogiri"
gem "nokogiri", :require => "nokogiri"
gem "nokogiri", :require => true
1mGROUPS0m
Each 4mgem24m 1mMAY 22mspecify membership in one or more groups. Any 4mgem24m that
does not specify membership in any group is placed in the 1mdefault0m
group.
gem "rspec", :group => :test
gem "wirble", :groups => [:development, :test]
The Bundler runtime allows its two main methods, 1mBundler.setup 22mand
1mBundler.require22m, to limit their impact to particular groups.
# setup adds gems to Ruby's load path
Bundler.setup # defaults to all groups
require "bundler/setup" # same as Bundler.setup
Bundler.setup(:default) # only set up the _default_ group
Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
# require requires all of the gems in the specified groups
Bundler.require # defaults to the _default_ group
Bundler.require(:default) # identical
Bundler.require(:default, :test) # requires the _default_ and _test_ groups
Bundler.require(:test) # requires the _test_ group
The Bundler CLI allows you to specify a list of groups whose gems 1mbun-0m
1mdle install 22mshould not install with the 1m--without 22moption. To specify
multiple groups to ignore, specify a list of groups separated by spa-
ces.
bundle install --without test
bundle install --without development test
After running 1mbundle install --without test22m, bundler will remember that
you excluded the test group in the last installation. The next time you
run 1mbundle install22m, without any 1m--without option22m, bundler will recall
it.
Also, calling 1mBundler.setup 22mwith no parameters, or calling 1mrequire0m
1m"bundler/setup" 22mwill setup all groups except for the ones you excluded
via 1m--without 22m(since they are not available).
Note that on 1mbundle install22m, bundler downloads and evaluates all gems,
in order to create a single canonical list of all of the required gems
and their dependencies. This means that you cannot list different ver-
sions of the same gems in different groups. For more details, see
Understanding Bundler 4mhttp://bundler.io/rationale.html24m.
1mPLATFORMS0m
If a gem should only be used in a particular platform or set of plat-
forms, you can specify them. Platforms are essentia
没有合适的资源?快使用搜索试试~ 我知道了~
ruby-2.6.4压缩包
需积分: 0 1 下载量 152 浏览量
2022-12-28
17:05:33
上传
评论
收藏 15.74MB GZ 举报
温馨提示
共9720个文件
rb:7622个
c:643个
h:198个
ruby-2.6.4.tar
资源推荐
资源详情
资源评论
收起资源包目录
ruby-2.6.4压缩包 (9720个子文件)
ChangeLog-2.0.0 830KB
ChangeLog-1.8.0 728KB
ChangeLog-2.1.0 604KB
ChangeLog-2.2.0 401KB
ChangeLog-2.3.0 401KB
ChangeLog-2.4.0 328KB
NEWS-2.0.0 18KB
NEWS-2.5.0 17KB
NEWS-2.3.0 13KB
NEWS-2.1.0 12KB
NEWS-2.2.0 11KB
NEWS-2.4.0 11KB
ChangeLog.libffi-3.1 206KB
ChangeLog-0.60_to_1.1 129KB
bundle-config.1 21KB
ruby.1 19KB
bundle-install.1 16KB
NEWS-1.9.1 16KB
bundle-update.1 14KB
bundle-exec.1 7KB
ri.1 5KB
bundle-outdated.1 4KB
rake.1 4KB
bundle.1 3KB
irb.1 3KB
erb.1 3KB
bundle-package.1 3KB
bundle-gem.1 3KB
bundle-lock.1 3KB
bundle-binstubs.1 2KB
bundle-pristine.1 2KB
bundle-platform.1 1KB
bundle-add.1 1KB
bundle-doctor.1 1KB
bundle-viz.1 1KB
bundle-init.1 1KB
bundle-check.1 966B
bundle-list.1 871B
bundle-remove.1 849B
goruby.1 784B
bundle-inject.1 738B
bundle-show.1 690B
bundle-clean.1 604B
bundle-open.1 581B
bundle-info.1 449B
NEWS-1.9.2 12KB
ChangeLog-1.9.3 2.86MB
NEWS-1.9.3 10KB
ffi_call.3 2KB
ffi_prep_cif_var.3 1KB
ffi_prep_cif.3 1KB
ffi.3 850B
gemfile.5 22KB
ChangeLog-0.06_to_0.52 47KB
ChangeLog-0.50_to_0.60 19KB
NEWS-1.8.7 14KB
configure.ac 127KB
configure.ac 17KB
Makefile.am 8KB
Makefile.am 4KB
Makefile.am 249B
Makefile.am 207B
Context.asm 1KB
Context.asm 1KB
Setup.atheos 239B
.autotest 1KB
rcs.awk 649B
fib.awk 101B
rb_optparse.bash 457B
configure.bat 7KB
ifchange.bat 2KB
rmdirs.bat 834B
rm.bat 380B
makedirs.bat 93B
mspec-tag.bat 24B
mspec-run.bat 24B
mspec-ci.bat 24B
mkspec.bat 24B
mspec.bat 24B
CHANGES.before-2008-05-10 580KB
lex.c.blt 11KB
props.h.blt 8KB
BSD-MIT 1023B
BSDL 1KB
BSDL 1KB
build-transcode 344B
bundle 3KB
bundle 949B
bundle 530B
load_fixture.ext.bundle 26B
load_fixture.bundle 26B
load_fixture.bundle 26B
bundle_ruby 1KB
bundled_gems 361B
Executable.bundler 3KB
bundler 532B
bundler 96B
big5.c 2.97MB
utf8_mac.c 2.7MB
japanese_euc.c 1.99MB
共 9720 条
- 1
- 2
- 3
- 4
- 5
- 6
- 98
资源评论
50W程序员都在看
- 粉丝: 1027
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功