# Bundle install

**URL:** <https://www.ruby-forum.com/t/bundle-install/191841>\
**Category:** Rails\
**Created:** [July 19, 2010, 6:28pm UTC](https://www.ruby-forum.com/t/bundle-install/191841 "2010-07-19T18:28:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 19, 2010, 6:28pm UTC](https://www.ruby-forum.com/t/bundle-install/191841/1 "2010-07-19T18:28:01Z")

</div>

What does the command:

> > bundle install

do?

It seems also that it only works with Rails3?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 19, 2010, 6:52pm UTC](https://www.ruby-forum.com/t/bundle-install/191841/2 "2010-07-19T18:52:44Z")

</div>

On 19 Jul 2010, at 18:28, Abder-Rahman A. wrote:

> What does the command:
> 
> > > bundle install
> 
> do?
> 
> It seems also that it only works with Rails3?

First, you need to install the bundler gem

sudo gem install bundler

Then you need to add a Gemfile to your Rails app root folder (the one  
with all the folders in app/, lib/ etc).

In the Gemfile, you specify the gems your Rails app uses, for example:

gem “rails”, “2.3.4”  
gem “rack”, “1.0.0”

if defined?(JRuby)  
gem “activerecord-jdbcmysql-adapter”  
gem “sequel” # for FAST import  
else # native libraries cannot be compiled on jruby - too bad  
gem “mysql”, “2.8.1”  
gem “rmagick”, “2.9.1”, :require =\> ‘pp’ # hack to avoid all the  
constant errors before rake spec (env is required twice)  
end

group :test do  
gem “rspec”, “\>=1.2.2”  
gem “rspec-rails”, “\>=1.2.2”  
gem “factory\_girl”, “\>=1.2.3”  
gem “rack-test”  
gem “cucumber”, “\>=0.6.4”  
gem “cucumber-rails”  
gem “pickle”  
gem “launchy”  
gem “database\_cleaner”  
gem “webrat” unless defined?(JRuby)  
gem “selenium-client”  
end

group :development do  
gem “mongrel”, “\>=1.1.5” unless defined?(JRuby)  
gem “capistrano”  
gem “capistrano\_colors”, :require =\> ‘pp’ # only require when  
needed, produces errors on rake spec  
end

When you have done so, “bundle install” will install the necessary  
gems and the right version and link it into your Rails app.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [July 19, 2010, 7:22pm UTC](https://www.ruby-forum.com/t/bundle-install/191841/3 "2010-07-19T19:22:58Z")

</div>

Thanks a lot Peter for your EXCELLENT support.
