bundler 1.0.0.rc.5 → 1.0.0.rc.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

Files changed (81) hide show
  1. data/CHANGELOG.md +18 -0
  2. data/ISSUES.md +30 -0
  3. data/README.md +3 -64
  4. data/lib/bundler.rb +33 -5
  5. data/lib/bundler/capistrano.rb +26 -5
  6. data/lib/bundler/cli.rb +41 -1
  7. data/lib/bundler/dsl.rb +1 -0
  8. data/lib/bundler/gem_helper.rb +18 -26
  9. data/lib/bundler/man/bundle +96 -0
  10. data/lib/bundler/man/bundle-config +92 -0
  11. data/lib/bundler/man/bundle-config.txt +108 -0
  12. data/lib/bundler/man/bundle-exec +107 -0
  13. data/lib/bundler/man/bundle-exec.txt +115 -0
  14. data/lib/bundler/man/bundle-install +280 -0
  15. data/lib/bundler/man/bundle-install.txt +331 -0
  16. data/lib/bundler/man/bundle-package +49 -0
  17. data/lib/bundler/man/bundle-package.txt +66 -0
  18. data/lib/bundler/man/bundle-update +202 -0
  19. data/lib/bundler/man/bundle-update.txt +207 -0
  20. data/lib/bundler/man/bundle.txt +83 -0
  21. data/lib/bundler/man/gemfile.5 +343 -0
  22. data/lib/bundler/man/gemfile.5.txt +317 -0
  23. data/lib/bundler/source.rb +4 -25
  24. data/lib/bundler/templates/Executable +1 -1
  25. data/lib/bundler/templates/Gemfile +2 -2
  26. data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
  27. data/lib/bundler/templates/newgem/Rakefile.tt +1 -1
  28. data/lib/bundler/templates/newgem/gitignore.tt +2 -1
  29. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +7 -3
  30. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -3
  31. data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -4
  32. data/lib/bundler/vendor/thor/parser/options.rb +9 -1
  33. data/lib/bundler/vendor/thor/shell.rb +1 -1
  34. data/lib/bundler/vendor/thor/util.rb +2 -2
  35. data/lib/bundler/version.rb +1 -1
  36. metadata +22 -48
  37. data/TODO.md +0 -13
  38. data/bin/bundle.compiled.rbc +0 -486
  39. data/lib/bundler.rbc +0 -5691
  40. data/lib/bundler/cli.rbc +0 -10105
  41. data/lib/bundler/definition.rbc +0 -9423
  42. data/lib/bundler/dependency.rbc +0 -2650
  43. data/lib/bundler/dsl.rbc +0 -5861
  44. data/lib/bundler/environment.rbc +0 -923
  45. data/lib/bundler/index.rbc +0 -0
  46. data/lib/bundler/installer.rbc +0 -1634
  47. data/lib/bundler/lazy_specification.rbc +0 -1721
  48. data/lib/bundler/lockfile_parser.rbc +0 -2524
  49. data/lib/bundler/remote_specification.rbc +0 -1058
  50. data/lib/bundler/resolver.rbc +0 -9067
  51. data/lib/bundler/rubygems_ext.rbc +0 -4490
  52. data/lib/bundler/runtime.rbc +0 -3350
  53. data/lib/bundler/settings.rbc +0 -2951
  54. data/lib/bundler/shared_helpers.rbc +0 -3614
  55. data/lib/bundler/source.rbc +0 -15697
  56. data/lib/bundler/spec_set.rbc +0 -3394
  57. data/lib/bundler/ui.rbc +0 -1407
  58. data/lib/bundler/vendor/thor.rbc +0 -5037
  59. data/lib/bundler/vendor/thor/actions.rbc +0 -4782
  60. data/lib/bundler/vendor/thor/actions/create_file.rbc +0 -1672
  61. data/lib/bundler/vendor/thor/actions/directory.rbc +0 -1477
  62. data/lib/bundler/vendor/thor/actions/empty_directory.rbc +0 -1773
  63. data/lib/bundler/vendor/thor/actions/file_manipulation.rbc +0 -2877
  64. data/lib/bundler/vendor/thor/actions/inject_into_file.rbc +0 -1764
  65. data/lib/bundler/vendor/thor/base.rbc +0 -7795
  66. data/lib/bundler/vendor/thor/core_ext/file_binary_read.rbc +0 -271
  67. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rbc +0 -1395
  68. data/lib/bundler/vendor/thor/core_ext/ordered_hash.rbc +0 -1862
  69. data/lib/bundler/vendor/thor/error.rbc +0 -240
  70. data/lib/bundler/vendor/thor/invocation.rbc +0 -2050
  71. data/lib/bundler/vendor/thor/parser.rbc +0 -101
  72. data/lib/bundler/vendor/thor/parser/argument.rbc +0 -1445
  73. data/lib/bundler/vendor/thor/parser/arguments.rbc +0 -2661
  74. data/lib/bundler/vendor/thor/parser/option.rbc +0 -2007
  75. data/lib/bundler/vendor/thor/parser/options.rbc +0 -3429
  76. data/lib/bundler/vendor/thor/shell.rbc +0 -1486
  77. data/lib/bundler/vendor/thor/shell/basic.rbc +0 -4872
  78. data/lib/bundler/vendor/thor/shell/color.rbc +0 -1659
  79. data/lib/bundler/vendor/thor/task.rbc +0 -2900
  80. data/lib/bundler/vendor/thor/util.rbc +0 -3196
  81. data/lib/bundler/version.rbc +0 -175
@@ -0,0 +1,92 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "BUNDLE\-CONFIG" "1" "August 2010" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBbundle\-config\fR \- Set bundler configuration options
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBbundle config\fR [\fIname\fR [\fIvalue\fR]]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command allows you to interact with bundler\'s configuration system\. Bundler retrieves its configuration from the local application (\fBapp/\.bundle/config\fR), environment variables, and the user\'s home directory (\fB~/\.bundle/config\fR), in that order of priority\.
14
+ .
15
+ .P
16
+ Executing \fBbundle config\fR with no parameters will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
17
+ .
18
+ .P
19
+ Executing \fBbundle config <name>\fR will print the value of that configuration setting, and where it was set\.
20
+ .
21
+ .P
22
+ Executing \fBbundle config <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\.
23
+ .
24
+ .SH "BUILD OPTIONS"
25
+ You can use \fBbundle config\fR to give bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
26
+ .
27
+ .P
28
+ A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
29
+ .
30
+ .IP "" 4
31
+ .
32
+ .nf
33
+
34
+ gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
35
+ .
36
+ .fi
37
+ .
38
+ .IP "" 0
39
+ .
40
+ .P
41
+ Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
42
+ .
43
+ .IP "" 4
44
+ .
45
+ .nf
46
+
47
+ bundle config build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
48
+ .
49
+ .fi
50
+ .
51
+ .IP "" 0
52
+ .
53
+ .P
54
+ After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
55
+ .
56
+ .SH "CONFIGURATION KEYS"
57
+ Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
58
+ .
59
+ .P
60
+ For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
61
+ .
62
+ .P
63
+ The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
64
+ .
65
+ .SH "LIST OF AVAILABLE KEYS"
66
+ The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
67
+ .
68
+ .TP
69
+ \fBpath\fR (\fBBUNDLE_PATH\fR)
70
+ The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundler\fR when \fB\-\-deployment\fR is used
71
+ .
72
+ .TP
73
+ \fBfrozen\fR (\fBBUNDLE_FROZEN\fR)
74
+ Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
75
+ .
76
+ .TP
77
+ \fBwithout\fR (\fBBUNDLE_WITHOUT\fR)
78
+ A \fB:\fR\-separated list of groups whose gems bundler should not install
79
+ .
80
+ .TP
81
+ \fBbin\fR (\fBBUNDLE_BIN\fR)
82
+ Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
83
+ .
84
+ .TP
85
+ \fBgemfile\fR (\fBBUNDLE_GEMFILE\fR)
86
+ The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
87
+ .
88
+ .P
89
+ In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR command\.
90
+ .
91
+ .P
92
+ You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
@@ -0,0 +1,108 @@
1
+ BUNDLE-CONFIG(1) BUNDLE-CONFIG(1)
2
+
3
+
4
+
5
+ NAME
6
+ bundle-config - Set bundler configuration options
7
+
8
+ SYNOPSIS
9
+ bundle config [name [value]]
10
+
11
+ DESCRIPTION
12
+ This command allows you to interact with bundler's configuration sys-
13
+ tem. Bundler retrieves its configuration from the local application
14
+ (app/.bundle/config), environment variables, and the user's home direc-
15
+ tory (~/.bundle/config), in that order of priority.
16
+
17
+ Executing bundle config with no parameters will print a list of all
18
+ bundler configuration for the current bundle, and where that configura-
19
+ tion was set.
20
+
21
+ Executing bundle config <name> will print the value of that configura-
22
+ tion setting, and where it was set.
23
+
24
+ Executing bundle config <name> <value> will set that configuration to
25
+ the value specified for all bundles executed as the current user. The
26
+ configuration will be stored in ~/.bundle/config.
27
+
28
+ BUILD OPTIONS
29
+ You can use bundle config to give bundler the flags to pass to the gem
30
+ installer every time bundler tries to install a particular gem.
31
+
32
+ A very common example, the mysql gem, requires Snow Leopard users to
33
+ pass configuration flags to gem install to specify where to find the
34
+ mysql_config executable.
35
+
36
+
37
+
38
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
39
+
40
+
41
+
42
+ Since the specific location of that executable can change from machine
43
+ to machine, you can specify these flags on a per-machine basis.
44
+
45
+
46
+
47
+ bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
48
+
49
+
50
+
51
+ After running this command, every time bundler needs to install the
52
+ mysql gem, it will pass along the flags you specified.
53
+
54
+ CONFIGURATION KEYS
55
+ Configuration keys in bundler have two forms: the canonical form and
56
+ the environment variable form.
57
+
58
+ For instance, passing the --without flag to bundle install(1) bun-
59
+ dle-install.1.html prevents Bundler from installing certain groups
60
+ specified in the Gemfile(5). Bundler persists this value in app/.bun-
61
+ dle/config so that calls to Bundler.setup do not try to find gems from
62
+ the Gemfile that you didn't install. Additionally, subsequent calls to
63
+ bundle install(1) bundle-install.1.html remember this setting and skip
64
+ those groups.
65
+
66
+ The canonical form of this configuration is "without". To convert the
67
+ canonical form to the environment variable form, capitalize it, and
68
+ prepend BUNDLE_. The environment variable form of "without" is BUN-
69
+ DLE_WITHOUT.
70
+
71
+ LIST OF AVAILABLE KEYS
72
+ The following is a list of all configuration keys and their purpose.
73
+ You can learn more about their operation in bundle install(1) bun-
74
+ dle-install.1.html.
75
+
76
+ path (BUNDLE_PATH)
77
+ The location on disk to install gems. Defaults to $GEM_HOME in
78
+ development and vendor/bundler when --deployment is used
79
+
80
+ frozen (BUNDLE_FROZEN)
81
+ Disallow changes to the Gemfile. Defaults to true when --deploy-
82
+ ment is used.
83
+
84
+ without (BUNDLE_WITHOUT)
85
+ A :-separated list of groups whose gems bundler should not
86
+ install
87
+
88
+ bin (BUNDLE_BIN)
89
+ Install executables from gems in the bundle to the specified
90
+ directory. Defaults to false.
91
+
92
+ gemfile (BUNDLE_GEMFILE)
93
+ The name of the file that bundler should use as the Gemfile.
94
+ This location of this file also sets the root of the project,
95
+ which is used to resolve relative paths in the Gemfile, among
96
+ other things. By default, bundler will search up from the cur-
97
+ rent working directory until it finds a Gemfile.
98
+
99
+ In general, you should set these settings per-application by using the
100
+ applicable flag to the bundle install(1) bundle-install.1.html command.
101
+
102
+ You can set them globally either via environment variables or bundle
103
+ config, whichever is preferable for your setup. If you use both, envi-
104
+ ronment variables will take preference over global settings.
105
+
106
+
107
+
108
+ August 2010 BUNDLE-CONFIG(1)
@@ -0,0 +1,107 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "BUNDLE\-EXEC" "1" "August 2010" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBbundle\-exec\fR \- Execute a command in the context of the bundle
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBbundle exec\fR \fIcommand\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command executes the command, making all gems specified in the \fBGemfile(5)\fR available to \fBrequire\fR in Ruby programs\.
14
+ .
15
+ .P
16
+ Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the \fBGemfile(5)\fR and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
17
+ .
18
+ .P
19
+ Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
20
+ .
21
+ .SH "BUNDLE INSTALL \-\-BINSTUBS"
22
+ If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
23
+ .
24
+ .P
25
+ After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
26
+ .
27
+ .SH "ENVIRONMENT MODIFICATIONS"
28
+ \fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
29
+ .
30
+ .IP "\(bu" 4
31
+ make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
32
+ .
33
+ .IP "\(bu" 4
34
+ put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
35
+ .
36
+ .IP "\(bu" 4
37
+ make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
38
+ .
39
+ .IP "\(bu" 4
40
+ add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
41
+ .
42
+ .IP "" 0
43
+ .
44
+ .P
45
+ It also modifies Rubygems:
46
+ .
47
+ .IP "\(bu" 4
48
+ disallow loading additional gems not in the bundle
49
+ .
50
+ .IP "\(bu" 4
51
+ modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it\'s not
52
+ .
53
+ .IP "\(bu" 4
54
+ Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment
55
+ .
56
+ .IP "\(bu" 4
57
+ Override \fBGem\.bin_path\fR to use the gems in the bundle, making system executables work
58
+ .
59
+ .IP "\(bu" 4
60
+ Add all gems in the bundle into Gem\.loaded_specs
61
+ .
62
+ .IP "" 0
63
+ .
64
+ .SH "RUBYGEMS PLUGINS"
65
+ At present, the Rubygems plugin system requires all files named \fBrubygems_plugin\.rb\fR on the load path of \fIany\fR installed gem when any Ruby code requires \fBrubygems\.rb\fR\. This includes executables installed into the system, like \fBrails\fR, \fBrackup\fR, and \fBrspec\fR\.
66
+ .
67
+ .P
68
+ Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies\.
69
+ .
70
+ .P
71
+ For instance, the \fBgemcutter 0\.5\fR gem depended on \fBjson_pure\fR\. If you had that version of gemcutter installed (even if you \fIalso\fR had a newer version without this problem), Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
72
+ .
73
+ .P
74
+ If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
75
+ .
76
+ .P
77
+ If this happens, bundler will say:
78
+ .
79
+ .IP "" 4
80
+ .
81
+ .nf
82
+
83
+ You have already activated json_pure 1\.4\.6 but your Gemfile
84
+ requires json_pure 1\.4\.3\. Consider using bundle exec\.
85
+ .
86
+ .fi
87
+ .
88
+ .IP "" 0
89
+ .
90
+ .P
91
+ In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
92
+ .
93
+ .P
94
+ You can find a list of all the gems containing gem plugins by running
95
+ .
96
+ .IP "" 4
97
+ .
98
+ .nf
99
+
100
+ ruby \-rubygems \-e "puts Gem\.find_files(\'rubygems_plugin\.rb\')"
101
+ .
102
+ .fi
103
+ .
104
+ .IP "" 0
105
+ .
106
+ .P
107
+ At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren\'t using (\fBgem uninstall gem_name\fR)\.
@@ -0,0 +1,115 @@
1
+ BUNDLE-EXEC(1) BUNDLE-EXEC(1)
2
+
3
+
4
+
5
+ NAME
6
+ bundle-exec - Execute a command in the context of the bundle
7
+
8
+ SYNOPSIS
9
+ bundle exec command
10
+
11
+ DESCRIPTION
12
+ This command executes the command, making all gems specified in the
13
+ Gemfile(5) available to require in Ruby programs.
14
+
15
+ Essentially, if you would normally have run something like rspec
16
+ spec/my_spec.rb, and you want to use the gems specified in the Gem-
17
+ file(5) and installed via bundle install(1) bundle-install.1.html, you
18
+ should run bundle exec rspec spec/my_spec.rb.
19
+
20
+ Note that bundle exec does not require that an executable is available
21
+ on your shell's $PATH.
22
+
23
+ BUNDLE INSTALL --BINSTUBS
24
+ If you use the --binstubs flag in bundle install(1) bun-
25
+ dle-install.1.html, Bundler will automatically create a directory
26
+ (which defaults to app_root/bin) containing all of the executables
27
+ available from gems in the bundle.
28
+
29
+ After using --binstubs, bin/rspec spec/my_spec.rb is identical to bun-
30
+ dle exec rspec spec/my_spec.rb.
31
+
32
+ ENVIRONMENT MODIFICATIONS
33
+ bundle exec makes a number of changes to the shell environment, then
34
+ executes the command you specify in full.
35
+
36
+ o make sure that it's still possible to shell out to bundle from
37
+ inside a command invoked by bundle exec (using $BUNDLE_BIN_PATH)
38
+
39
+ o put the directory containing executables (like rails, rspec,
40
+ rackup) for your bundle on $PATH
41
+
42
+ o make sure that if bundler is invoked in the subshell, it uses the
43
+ same Gemfile (by setting BUNDLE_GEMFILE)
44
+
45
+ o add -rbundler/setup to $RUBYOPT, which makes sure that Ruby pro-
46
+ grams invoked in the subshell can see the gems in the bundle
47
+
48
+
49
+
50
+ It also modifies Rubygems:
51
+
52
+ o disallow loading additional gems not in the bundle
53
+
54
+ o modify the gem method to be a no-op if a gem matching the require-
55
+ ments is in the bundle, and to raise a Gem::LoadError if it's not
56
+
57
+ o Define Gem.refresh to be a no-op, since the source index is always
58
+ frozen when using bundler, and to prevent gems from the system
59
+ leaking into the environment
60
+
61
+ o Override Gem.bin_path to use the gems in the bundle, making system
62
+ executables work
63
+
64
+ o Add all gems in the bundle into Gem.loaded_specs
65
+
66
+
67
+
68
+ RUBYGEMS PLUGINS
69
+ At present, the Rubygems plugin system requires all files named
70
+ rubygems_plugin.rb on the load path of any installed gem when any Ruby
71
+ code requires rubygems.rb. This includes executables installed into the
72
+ system, like rails, rackup, and rspec.
73
+
74
+ Since Rubygems plugins can contain arbitrary Ruby code, they commonly
75
+ end up activating themselves or their dependencies.
76
+
77
+ For instance, the gemcutter 0.5 gem depended on json_pure. If you had
78
+ that version of gemcutter installed (even if you also had a newer ver-
79
+ sion without this problem), Rubygems would activate gemcutter 0.5 and
80
+ json_pure <latest>.
81
+
82
+ If your Gemfile(5) also contained json_pure (or a gem with a dependency
83
+ on json_pure), the latest version on your system might conflict with
84
+ the version in your Gemfile(5), or the snapshot version in your Gem-
85
+ file.lock.
86
+
87
+ If this happens, bundler will say:
88
+
89
+
90
+
91
+ You have already activated json_pure 1.4.6 but your Gemfile
92
+ requires json_pure 1.4.3. Consider using bundle exec.
93
+
94
+
95
+
96
+ In this situation, you almost certainly want to remove the underlying
97
+ gem with the problematic gem plugin. In general, the authors of these
98
+ plugins (in this case, the gemcutter gem) have released newer versions
99
+ that are more careful in their plugins.
100
+
101
+ You can find a list of all the gems containing gem plugins by running
102
+
103
+
104
+
105
+ ruby -rubygems -e "puts Gem.find_files('rubygems_plugin.rb')"
106
+
107
+
108
+
109
+ At the very least, you should remove all but the newest version of each
110
+ gem plugin, and also remove all gem plugins that you aren't using (gem
111
+ uninstall gem_name).
112
+
113
+
114
+
115
+ August 2010 BUNDLE-EXEC(1)
@@ -0,0 +1,280 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "BUNDLE\-INSTALL" "1" "August 2010" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBbundle install\fR [\-\-local] [\-\-quiet] [\-\-gemfile=GEMFILE] [\-\-system]
11
+ .
12
+ .IP "" 4
13
+ .
14
+ .nf
15
+
16
+ [\-\-deployment] [\-\-frozen] [\-\-path]
17
+ [\-\-binstubs[=DIRECTORY]] [\-\-without=GROUP1[ GROUP2\.\.\.]]
18
+ .
19
+ .fi
20
+ .
21
+ .IP "" 0
22
+ .
23
+ .SH "DESCRIPTION"
24
+ Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
25
+ .
26
+ .P
27
+ If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
28
+ .
29
+ .P
30
+ If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
31
+ .
32
+ .SH "OPTIONS"
33
+ .
34
+ .TP
35
+ \fB\-\-gemfile=<gemfile>\fR
36
+ The location of the Gemfile(5) that bundler should use\. This defaults to a gemfile in the current working directory\. In general, bundler will assume that the location of the Gemfile(5) is also the project root, and will look for the \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to it\.
37
+ .
38
+ .TP
39
+ \fB\-\-path=<path>\fR
40
+ The location to install the gems in the bundle to\. This defaults to the gem home, which is the location that \fBgem install\fR installs gems to\. This means that, by default, gems installed without a \fB\-\-path\fR setting will show up in \fBgem list\fR\. This setting is a \fIremembered option\fR\.
41
+ .
42
+ .TP
43
+ \fB\-\-system\fR
44
+ Installs the gems in the bundle to the system location\. This overrides any previous \fIremembered\fR use of \fB\-\-path\fR\.
45
+ .
46
+ .TP
47
+ \fB\-\-without=<list>\fR
48
+ A space\-separated list of groups to skip installing\. This is a \fIremembered option\fR\.
49
+ .
50
+ .TP
51
+ \fB\-\-local\fR
52
+ Do not attempt to connect to \fBrubygems\.org\fR, instead using just the gems located in \fBvendor/cache\fR\. Note that if a more appropriate platform\-specific gem exists on \fBrubygems\.org\fR, this will bypass the normal lookup\.
53
+ .
54
+ .TP
55
+ \fB\-\-deployment\fR
56
+ Switches bundler\'s defaults into \fIdeployment mode\fR\.
57
+ .
58
+ .TP
59
+ \fB\-\-binstubs[=<directory>]\fR
60
+ Create a directory (defaults to \fBbin\fR) containing an executable that runs in the context of the bundle\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all dependencies used come from the bundled gems\.
61
+ .
62
+ .SH "DEPLOYMENT MODE"
63
+ Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment, use the \fB\-\-deployment\fR flag\.
64
+ .
65
+ .IP "1." 4
66
+ A \fBGemfile\.lock\fR is required\.
67
+ .
68
+ .IP
69
+ To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
70
+ .
71
+ .IP
72
+ This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
73
+ .
74
+ .IP "2." 4
75
+ The \fBGemfile\.lock\fR must be up to date
76
+ .
77
+ .IP
78
+ In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
79
+ .
80
+ .IP
81
+ In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
82
+ .
83
+ .IP "3." 4
84
+ Gems are installed to \fBvendor/bundle\fR not your default system location
85
+ .
86
+ .IP
87
+ In development, it\'s convenient to share the gems used in your application with other applications and other scripts run on the system\.
88
+ .
89
+ .IP
90
+ In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
91
+ .
92
+ .IP
93
+ As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
94
+ .
95
+ .IP "" 0
96
+ .
97
+ .SH "SUDO USAGE"
98
+ By default, bundler installs gems to the same location as \fBgem install\fR\.
99
+ .
100
+ .P
101
+ In some cases, that location may not be writable by your Unix user\. In that case, bundler will stage everything in a temporary directory, then ask you for your \fBsudo\fR password in order to copy the gems into their system location\.
102
+ .
103
+ .P
104
+ From your perspective, this is identical to installing them gems directly into the system\.
105
+ .
106
+ .P
107
+ You should never use \fBsudo bundle install\fR\. This is because several other steps in \fBbundle install\fR must be performed as the current user:
108
+ .
109
+ .IP "\(bu" 4
110
+ Updating your \fBGemfile\.lock\fR
111
+ .
112
+ .IP "\(bu" 4
113
+ Updating your \fBvendor/cache\fR, if necessary
114
+ .
115
+ .IP "\(bu" 4
116
+ Checking out private git repositories using your user\'s SSH keys
117
+ .
118
+ .IP "" 0
119
+ .
120
+ .P
121
+ Of these three, the first two could theoretically be performed by \fBchown\fRing the resulting files to \fB$SUDO_USER\fR\. The third, however, can only be performed by actually invoking the \fBgit\fR command as the current user\.
122
+ .
123
+ .P
124
+ As a result, you should run \fBbundle install\fR as the current user, and bundler will ask for your password if it is needed to perform the final step\.
125
+ .
126
+ .SH "INSTALLING GROUPS"
127
+ By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
128
+ .
129
+ .P
130
+ However, you can explicitly tell bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
131
+ .
132
+ .P
133
+ While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
134
+ .
135
+ .P
136
+ This is so that installing a different set of groups on another machine (such as a production server) will not change the gems and versions that you have already developed and tested against\.
137
+ .
138
+ .P
139
+ \fBBundler offers a rock\-solid guarantee that the third\-party code you are running in development and testing is also the third\-party code you are running in production\. You can choose to exclude some of that code in different environments, but you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
140
+ .
141
+ .P
142
+ For a simple illustration, consider the following Gemfile(5):
143
+ .
144
+ .IP "" 4
145
+ .
146
+ .nf
147
+
148
+ source "http://rubygems\.org"
149
+
150
+ gem "sinatra"
151
+
152
+ group :production do
153
+ gem "rack\-perftools\-profiler"
154
+ end
155
+ .
156
+ .fi
157
+ .
158
+ .IP "" 0
159
+ .
160
+ .P
161
+ In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
162
+ .
163
+ .P
164
+ When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
165
+ .
166
+ .P
167
+ This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
168
+ .
169
+ .P
170
+ This also means that you cannot include different versions of the same gem in different groups, because doing so would result in different sets of dependencies used in development and production\. Because of the vagaries of the dependency resolution process, this usually affects more than just the gems you list in your Gemfile(5), and can (surprisingly) radically change the gems you are using\.
171
+ .
172
+ .SH "REMEMBERED OPTIONS"
173
+ Some options (marked above in the \fIOPTIONS\fR section) are remembered between calls to \fBbundle install\fR, and by the Bundler runtime\.
174
+ .
175
+ .P
176
+ For instance, if you run \fBbundle install \-\-without test\fR, a subsequent call to \fBbundle install\fR that does not include a \fB\-\-without\fR flag will remember your previous choice\.
177
+ .
178
+ .P
179
+ In addition, a call to \fBBundler\.setup\fR will not attempt to make the gems in those groups available on the Ruby load path, as they were not installed\.
180
+ .
181
+ .P
182
+ The settings that are remembered are:
183
+ .
184
+ .TP
185
+ \fB\-\-deployment\fR
186
+ At runtime, this remembered setting will also result in Bundler raising an exception if the \fBGemfile\.lock\fR is out of date\.
187
+ .
188
+ .TP
189
+ \fB\-\-path\fR
190
+ Subsequent calls to \fBbundle install\fR will install gems to the directory originally passed to \fB\-\-path\fR\. The Bundler runtime will look for gems in that location\. You can revert this option by running \fBbundle install \-\-system\fR\.
191
+ .
192
+ .TP
193
+ \fB\-\-binstubs\fR
194
+ Bundler will update the executables every subsequent call to \fBbundle install\fR\.
195
+ .
196
+ .TP
197
+ \fB\-\-without\fR
198
+ As described above, Bundler will skip the gems specified by \fB\-\-without\fR in subsequent calls to \fBbundle install\fR\. The Bundler runtime will also not try to make the gems in the skipped groups available\.
199
+ .
200
+ .SH "THE GEMFILE\.LOCK"
201
+ When you run \fBbundle install\fR, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
202
+ .
203
+ .P
204
+ Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
205
+ .
206
+ .P
207
+ Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
208
+ .
209
+ .P
210
+ As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control\. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third\-party code being used if \fBany\fR of the gems in the Gemfile(5) or any of their dependencies have been updated\.
211
+ .
212
+ .SH "CONSERVATIVE UPDATING"
213
+ When you make a change to the Gemfile(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
214
+ .
215
+ .P
216
+ In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
217
+ .
218
+ .P
219
+ Let\'s take a look at an example\. Here\'s your original Gemfile(5):
220
+ .
221
+ .IP "" 4
222
+ .
223
+ .nf
224
+
225
+ source "http://rubygems\.org"
226
+
227
+ gem "actionpack", "2\.3\.8"
228
+ gem "activemerchant"
229
+ .
230
+ .fi
231
+ .
232
+ .IP "" 0
233
+ .
234
+ .P
235
+ In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBactivesupport >= 2\.3\.2\fR, \fBbraintree >= 2\.0\.0\fR, and \fBbuilder >= 2\.0\.0\fR\.
236
+ .
237
+ .P
238
+ When the dependencies are first resolved, Bundler will select \fBactivesupport 2\.3\.8\fR, which satisfies the requirements of both gems in your Gemfile(5)\.
239
+ .
240
+ .P
241
+ Next, you modify your Gemfile(5) to:
242
+ .
243
+ .IP "" 4
244
+ .
245
+ .nf
246
+
247
+ source "http://rubygems\.org"
248
+
249
+ gem "actionpack", "3\.0\.0\.rc"
250
+ gem "activemerchant"
251
+ .
252
+ .fi
253
+ .
254
+ .IP "" 0
255
+ .
256
+ .P
257
+ The \fBactionpack 3\.0\.0\.rc\fR gem has a number of new dependencies, and updates the \fBactivesupport\fR dependency to \fB= 3\.0\.0\.rc\fR and the \fBrack\fR dependency to \fB~> 1\.2\.1\fR\.
258
+ .
259
+ .P
260
+ When you run \fBbundle install\fR, Bundler notices that you changed the \fBactionpack\fR gem, but not the \fBactivemerchant\fR gem\. It evaluates the gems currently being used to satisfy its requirements:
261
+ .
262
+ .TP
263
+ \fBactivesupport 2\.3\.8\fR
264
+ also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
265
+ .
266
+ .TP
267
+ \fBrack ~> 1\.1\.0\fR
268
+ not currently being used to satify another dependency
269
+ .
270
+ .P
271
+ Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
272
+ .
273
+ .P
274
+ Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
275
+ .
276
+ .P
277
+ To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
278
+ .
279
+ .P
280
+ \fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gems in the Gemfile(5) are impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.