Questions tagged [bundler]

Bundler is a tool that makes it easier to keep track of what Ruby gems (and what versions of those gems) an application depends upon. It does so by installing all the gems in your application’s Gemfile. Bundler itself is a gem and can be installed with the following: $ gem install bundler

Bundler is a system that attempts to manage a Ruby application's gem dependencies across multiple developers and environments. One can define the required gems for a Ruby application in a Gemfile and then "bundle" those gems and any sub-dependencies with the application, effectively sandboxing the app -- not just to a specific set of gems, but to a specific set of gem versions.

Useful links

Example Gemfile

source "http://rubygems.org"

gem "capistrano"
gem "haml"
gem "pony", "1.1"
gem "sinatra"
gem "sinatra-content-for2" # content_for :key
gem "unicorn", "1.1.5"

group :development do
  gem "json"
  gem "mechanize"
  gem "nokogiri"
  gem "rack-test"
  gem "rspec"
end
4118 questions
68
votes
2 answers

Difference between $Bundle install and $Bundle update

Could you tell me, whats the difference between: $Bundle update and $Bundle install
matDobek
  • 757
  • 1
  • 5
  • 12
66
votes
4 answers

Add gem to gemfile with bundler from command line

When using node package manager you can specify npm install --save mynodemodule which automatically pops the module in package.json I was wondering if there is a command for bundler that allows you to add the gem and version to the gemfile from the…
sren
  • 3,513
  • 4
  • 25
  • 28
66
votes
8 answers

Error installing Rmagick on Mountain Lion

I have seen other people with the same issue of installing RMagick on Mountain Lion However none of the suggested solutions have allowed me to successfully install rmagick. Here is the error message I am…
tomciopp
  • 2,602
  • 2
  • 31
  • 60
65
votes
1 answer

bundle vs bundler / bundle vs bundle install

What is the difference between the bundle & bundler commands? What is the difference between bundle & bundle install? If there're no differences, why have multiple commands that do the same thing?
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
64
votes
4 answers

Rubygems, Bundler and RVM confusion

I read "Relationships between Rubygems, Bundler, and RVM" before asking it again. Well, there are many questions like this, but people who answered say they work with Rubygems, RVM and Bundler, and they have not explained how each of these work in…
Anand
  • 10,310
  • 24
  • 90
  • 135
64
votes
6 answers

Bundle command not found mac

I'm using ruby, and I was given a zip file with some ruby programs and it says: inside the folder, run bundle install to install the packages required. When I run the command in my terminal, it says bundle command not found. Can someone please…
ytk
  • 2,787
  • 4
  • 27
  • 42
63
votes
3 answers

Meaning of new block "git_source(:github)" in Gemfile

Recently I created a new Rails 5 app, without a git repository. The auto-generated Gemfile contains a new block I had not seen before: git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") …
62
votes
9 answers

Errors Installing mysql2 gem via the Bundler

I am trying to install the mysql2 gem via the Bundler, but it keeps dying with the following error: ** executing command /home/cc_rails/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in 'rescue in block in build_extensions':…
T.J. Schuck
  • 3,645
  • 2
  • 19
  • 20
61
votes
7 answers

Rails bundler doesn't install gems inside a group

I have several gems including ruby-debug in a bundler group called :development. When I run the bundle command, these gems are ignored and it only installs the gems that are not in any group. How can I make sure bundler doesn't ignore the gems in…
picardo
  • 24,530
  • 33
  • 104
  • 151
60
votes
2 answers

How to see the dependency tree just from Gemfile?

I am getting the following error when doing bundle install Make sure that `gem install couchbase -v '1.3.3'` succeeds before bundling. Now, i have not included this gem in the Gemfile, so it's coming from some dependency. How can i figure out which…
Mohit Verma
  • 2,019
  • 7
  • 25
  • 33
59
votes
13 answers

Bundle not working with rbenv

I'm trying to use bundler with rbenv. I has been working until today. The only thing I may have done to break it was gem pristine --all or gem cleanup ? When trying to install bundler i get the following error. Antarrs-MacBook-Pro:some-app…
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
57
votes
2 answers

Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0

I've been doing the Rails tutorial found here and have been successful up to the point of having to migrate the Comments migration using $ rails db:migrate. Prior to this point, I've been able to generate the Article model and migrate the Articles…
gangelo
  • 3,034
  • 4
  • 29
  • 43
57
votes
18 answers

Bundle Install could not fetch specs from https://rubygems.org/

I'm attempting to follow the Hartl Rails Tutorial, and having trouble with the bundler gem. When using the commands 'bundle install' or 'bundle update' I get the following output: Fetching source index from https://rubygems.org/ Could not fetch…
Steven
  • 571
  • 1
  • 5
  • 6
56
votes
6 answers

Install newer version of bundler with bundler

If I change the version of bundler required in a Gemfile, and then type bundle, I get Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (>= 1.10.2) ruby Current Bundler version: bundler (1.9.9) This…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
55
votes
19 answers

RVM Bundle Install Missing Gem Error even though gem is installed

I'm getting the following error even though I currently do have the Bundler gem installed (it appears when I run $gem list). ERROR: Gem bundler is not installed, run `gem install bundler` first. I'm using RVM and my $PATH is as…
cstingl
  • 603
  • 1
  • 5
  • 8