Skip to content
100644 104 lines (78 sloc) 4.08 KB
5715776 @indirect Refactor UPGRADING out of README, add 0.9 → 1.0 notes
indirect authored
1 ## Bundler 0.9 to 1.0 and above
3 Upgrading from Bundler 0.9 to 1.0 is relatively painless. The
4 Gemfile API is the same, so your old Gemfiles should continue
5 to work.
6a6a365 @indirect Add 0.9 to 1.0 note about Passenger
indirect authored
7 The "env" file that 0.9 created at `.bundle/environment.rb` has been
8 removed. As a side effect of this, Passenger will only find your
9 bundled gems if you install with `bundle install --deployment`.
10 Alternatively, you can tell Passenger where you gems are installed,
11 [something like this](
5715776 @indirect Refactor UPGRADING out of README, add 0.9 → 1.0 notes
indirect authored
13 The `bundle lock` command is no longer needed, as the
14 Gemfile.lock file is now automatically generated by `bundle install`.
15 If you have not yet done so, add your Gemfile.lock to source control
16 and check it in.
18 Running `bundle install` no longer updates the versions of your gems.
19 If you need to update just one gem, run `bundle update GEMNAME`. To
20 update all gems to the newest versions possible, run `bundle update`.
22 Bundler now supports multiple platforms, using a block syntax to
23 declare platform-specific gems:
25 platform :jruby do
26 gem "jruby-maven-plugins"
27 end
29 Deploying using Bundler is even easier than it was before, as Bundler
30 now includes a Capistrano recipe. Simply add this line to the top of
31 your deploy.rb file to run Bundler automatically as part of deploying:
33 require 'bundler/capistrano'
35 For more details on deploying using bundler, see the documentation
86f56e5 @leereilly Fixed broken link; works, but
leereilly authored
36 for the bundler cap task, and the [documentation on deploying](
5715776 @indirect Refactor UPGRADING out of README, add 0.9 → 1.0 notes
indirect authored
39 ## Bundler 0.8 to 0.9 and above
41 Upgrading to Bundler 0.9 from Bundler 0.8 requires upgrading several
42 API calls in your Gemfile, and some workarounds if you are using Rails 2.3.
44 ### Gemfile Removals
46 Bundler 0.9 removes the following Bundler 0.8 Gemfile APIs:
48 1. `disable_system_gems`: This is now the default (and only) option
49 for bundler. Bundler uses the system gems you have specified
50 in the Gemfile, and only the system gems you have specified
51 (and their dependencies)
52 2. `disable_rubygems`: This is no longer supported. We are looking
53 into ways to get the fastest performance out of each supported
54 scenario, and we will make speed the default where possible.
55 3. `clear_sources`: Bundler now defaults to an empty source
56 list. If you want to include Rubygems, you can add the source
57 via source "". If you use bundle init, this
58 source will be automatically added for you in the generated
59 Gemfile
60 4. `bundle_path`: You can specify this setting when installing
61 via `bundle install /path/to/bundle`. Bundler will remember
62 where you installed the dependencies to on a particular
63 machine for future installs, loads, setups, etc.
8d0b0e1 @fxn gems provide "executables", they are rarely also "binaries"
fxn authored
64 5. `bin_path`: Bundler no longer generates executables in the root
65 of your app. You should use `bundle exec` to execute executables
5715776 @indirect Refactor UPGRADING out of README, add 0.9 → 1.0 notes
indirect authored
66 in the current context.
68 ### Gemfile Changes
70 Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
72 1. Bundler 0.8 supported :only and :except as APIs for describing
73 groups of gems. Bundler 0.9 supports a single `group` method,
74 which you can use to group gems together. See the above "Group"
75 section for more information.
77 This means that `gem "foo", :only => :production` becomes
78 `gem "foo", :group => :production`, and
79 `only :production { gem "foo" }` becomes
80 `group :production { gem "foo" }`
82 The short version is: group your gems together logically, and
83 use the available commands to make use of the groups you've
84 created.
86 2. `:require_as` becomes `:require`
88 3. `:vendored_at` is fully removed; you should use `:path`
90 ### API Changes
92 1. `Bundler.require_env(:environment)` becomes
93 `Bundler.require(:multiple, :groups)`. You must
94 now specify the default group (the default group is the
95 group made up of the gems not assigned to any group)
96 explicitly. So `Bundler.require_env(:test)` becomes
97 `Bundler.require(:default, :test)`
99 2. `require 'vendor/gems/environment'`: In unlocked
100 mode, where using system gems, this becomes
101 `Bundler.setup(:multiple, :groups)`. If you don't
102 specify any groups, this puts all groups on the load
aed1779 @leereilly Killed a comma.
leereilly authored
103 path. In locked mode, it becomes `require '.bundle/environment'`
Something went wrong with that request. Please try again.