forked from rubygems/bundler
/
index.html
222 lines (222 loc) · 10.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Bundler: The best way to manage Ruby applications</title>
<link href="/stylesheets/application.css" media="all" rel="stylesheet" type="text/css"/><link href="/stylesheets/sunburst.css" media="all" rel="stylesheet" type="text/css"/>
<link href="/images/favicon.png" rel="shortcut icon" type="image/png" />
</head>
<body>
<div id="body">
<div id="contents">
<div id="header">
<a href="/">
<img alt="The best way to manage your application's dependencies" src="images/gembundler.png" width="725"/>
</a>
</div>
<div id="intro">
Bundler manages an <strong>application's dependencies</strong> through its
entire life across many machines systematically and repeatably.
</div>
<h2>Getting Started</h2>
<div class="contents">
<div class="bullet">
<div class="description">
Getting started with bundler is easy
</div>
<pre class='sunburst'>$ gem install bundler
</pre>
</div>
<div class="bullet">
<div class="description">
If you're on an old version of Rubygems
(before 1.3.6)
</div>
<pre class='sunburst'>$ gem update --system
</pre>
</div>
<div class="bullet">
<div class="description">
Specify your dependencies in a Gemfile in your project's root
</div>
<pre class="sunburst">source <span class="String"><span class="String">"</span>http://rubygems.org<span class="String">"</span></span>
gem <span class="String"><span class="String">"</span>nokogiri<span class="String">"</span></span>
gem <span class="String"><span class="String">"</span>rack<span class="String">"</span></span>, <span class="String"><span class="String">"</span>~>1.1<span class="String">"</span></span>
gem <span class="String"><span class="String">"</span>rspec<span class="String">"</span></span>, <span class="Constant"><span class="Constant">:</span>require</span> => <span class="String"><span class="String">"</span>spec<span class="String">"</span></span>
</pre>
<a href="gemfile.html">Learn More: Gemfiles</a>
</div>
<div class="bullet">
<div class="description">
Install all of the required gems from your specified sources
</div>
<pre class='sunburst'>$ bundle install
$ git add Gemfile</pre>
<a href="bundle_install.html">Learn More: bundle install</a>
</div>
<div class="bullet">
<div class="description">
Inside your app, load up the bundled environment
</div>
<pre class="sunburst"><span class="Keyword">require</span> <span class="String"><span class="String">"</span>rubygems<span class="String">"</span></span>
<span class="Keyword">require</span> <span class="String"><span class="String">"</span>bundler<span class="String">"</span></span>
<span class="Support">Bundler</span>.<span class="Entity">setup</span>

<span class="Keyword">require</span> <span class="String"><span class="String">"</span>nokogiri<span class="String">"</span></span>
<span class="Comment"><span class="Comment">#</span> any other requires you might need</span>
</pre>
<a href="bundler_setup.html">Learn More: Bundler.setup</a>
</div>
<div class="bullet">
<div class="description">
Run a script provided by a bundled gem
</div>
<pre class='sunburst'>$ bundle exec rackup
</pre>
</div>
<div class="bullet">
<div class="description">
When you're ready to share your application
or deploy it, lock down all the versions of the gems
you're using
</div>
<pre class='sunburst'>$ bundle lock
$ git add Gemfile.lock</pre>
<a href="bundle_lock.html">Learn more: bundle lock</a>
</div>
</div>
<h2>Using Bundler with Frameworks</h2>
<div class="contents">
<div class="bullet">
<div class="description">
Bundler works out of the box with Rails 3. Once you
understand the basics of using bundler, you know
everything you need to know.
<a href="rails3.html">Using Bundler with Rails 3</a>
</div>
</div>
<div class="bullet">
<div class="description">
Bundler works with Rails 2.3 with a small change
to boot.rb and adding a preinitializer.rb.
<a href="rails23.html">Using Bundler with Rails 2.3</a>
</div>
</div>
<!-- .bullet -->
<!-- .description -->
<!-- Setting up Sinatra to use Bundler is as simple as -->
<!-- using Bundler itself. -->
<!-- = link("Using Bundler with Sinatra", "sinatra.html") -->
</div>
<h2>Checking Out an Application With a Gemfile</h2>
<div class="contents">
<div class="bullet">
<div class="description">
Install the required gems
</div>
<pre class='sunburst'>$ bundle install</pre>
<a href="bundle_install.html">Learn More: bundle install</a>
</div>
</div>
<h2>Digging Further</h2>
<div class="contents">
<div class="bullet">
<div class="description">
Store all of the required gems in your
application. All future installs will get gems
from this cache, bypassing rubygems.org
</div>
<pre class='sunburst'>$ bundle package</pre>
<a href="bundle_package.html">Learn More: bundle package</a>
</div>
<div class="bullet">
<div class="description">
Put dependencies in a group, so they can
be ignored at install time or required
together in your application
</div>
<pre class="sunburst">group <span class="Constant"><span class="Constant">:</span>development</span> <span class="Keyword">do</span>
 gem <span class="String"><span class="String">"</span>wirble<span class="String">"</span></span>
<span class="Keyword">end</span>
</pre>
<a href="groups.html">Learn more: Groups</a>
</div>
<div class="bullet">
<div class="description">
Use a gem that is stored in git
and has a .gemspec at its root. Gemspecs with
bins or C extensions are supported
</div>
<pre class="sunburst">gem <span class="String"><span class="String">"</span>nokogiri<span class="String">"</span></span>, <span class="Constant"><span class="Constant">:</span>git</span> =>
 <span class="String"><span class="String">"</span>git://github.com/tenderlove/nokogiri.git<span class="String">"</span></span>
</pre>
<a href="git.html">Learn more: Git</a>
</div>
<div class="bullet">
<div class="description">
Use a gem that you are actively developing
on your file system
</div>
<pre class="sunburst">gem <span class="String"><span class="String">"</span>nokogiri<span class="String">"</span></span>, <span class="Constant"><span class="Constant">:</span>path</span> => <span class="String"><span class="String">"</span>~/Code/nokogiri<span class="String">"</span></span>
</pre>
</div>
<div class="bullet">
<div class="description">
Install gems to a different location
(the default is ~/.bundle)
</div>
<div class="how">
<pre class='sunburst'>$ bundle install vendor --disable-shared-gems</pre>
<div class="notes">
By specifying --disable-shared-gems, you are telling
bundler to install the gems into vendor, even if
they are already installed in the system
</div>
</div>
<a href="bundle_install.html">Learn More: bundle install</a>
</div>
</div>
</div>
</div>
<div id="footer">
<img alt="Emocow" src="images/emocow.png"/>
<div class="spacer"></div>
<div id="navigation">
<p>
<b>commands</b>
<a href="./index.html">home</a>
/
<a href="./bundle_install.html">install</a>
/
<a href="./bundle_lock.html">lock</a>
/
<a href="./bundle_package.html">package</a>
</p>
<p>
<b>usage</b>
<a href="./gemfile.html">gemfile</a>
/
<a href="./git.html">git</a>
/
<a href="./groups.html">groups</a>
/
<a href="./bundler_setup.html">setup</a>
/
<a href="./deploying.html">deploying</a>
</p>
<p>
<b>frameworks</b>
<a href="./rubygems.html">rubygems</a>
/
<a href="./sinatra.html">sinatra</a>
/
<a href="./rails23.html">rails 2.3</a>
/
<a href="./rails3.html">rails 3</a>
</p>
</div>
<div class="spacer"></div>
<img alt="Bundler small" src="images/bundler-small.png"/>
</div>
<div id="credits">
<p>Bundler icon and logo designed by <a href="http://twitter.com/johnneiner">John Neiner</a> and donated by <a href="http://pixelgraphics.us">Pixel Graphic Design Studio</a></p>
</div>
<a href="http://github.com/carlhuda/bundler/" id="github">
<img alt="Fork me on GitHub" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" />
</a>
<div id="versions">
<a class="current" href="v0.9/index.html">v0.9</a>
<a class="" href="v1.0/index.html">v1.0</a>
</div>
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-557621-9']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</body>
</html>