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
2
votes
0 answers

I've installed the Canvas LMS; when I run canvas_init start, I get an error

As stated in the title, I get an error. Specifically, this: Undefined local variable or method `git_source' for Gemfile from /var/www/canvas/Gemfile.d/_before.rb:53 I checked bundler: canvas$ bundler -v which returns: Bundler version…
Kickasstimus
  • 197
  • 15
2
votes
2 answers

Ruby Gems not found despite bundle install

I have a Rails app. My collaborator updated the app's Ruby version and added Gems. I had to update my local version of Ruby to 2.3.1. Now it seems that rails s looks for gems in a different location than where bundle install puts them. What do I…
Falk
  • 325
  • 1
  • 3
  • 10
2
votes
0 answers

Downloading activerecord-3.2.14 revealed dependencies not in the API

When I am running bundle install, I am getting below issue: Downloading activerecord-3.2.14 revealed dependencies not in the API (activesupport (= 3.2.14), activemodel (= 3.2.14), arel (~> 3.0.2), tzinfo (~> 0.3.29)). Installing with --full-index…
Amit Kumar
  • 53
  • 1
  • 8
2
votes
1 answer

Is require ´bundler/setup' the same as running Bundler.setup?

Is this: require 'bundler' Bundler.setup accomplishing the same as: require 'bundler/setup' As far as I understand, bundler/setup requires all groups automatically, while this isn't the case with require 'bundler'. So considering this fact, does…
anemaria20
  • 1,646
  • 2
  • 17
  • 36
2
votes
1 answer

about bundle install with svn source path for rails3

we can use :git=>'git path'来bundle install gem, but how to use them from a svn path?
mlzboy
  • 14,343
  • 23
  • 76
  • 97
2
votes
0 answers

Bundler could not find compatible versions for gem "faraday"

I need help understanding this bundler error message: Bundler could not find compatible versions for gem "faraday": In Gemfile: metainspector (= 5.4.1) was resolved to 5.4.1, which depends on faraday-http-cache (~> 2.0) was resolved to…
Daniel Bonnell
  • 4,817
  • 9
  • 48
  • 88
2
votes
2 answers

Ignore rake task in production

I have a rake task to populate my db which depends on faker, so at the top there's: require 'faker' The problem is I don't install faker in production so all rake commands (like db:migrate) fail on that require line, saying faker is…
tyson
  • 23
  • 2
2
votes
2 answers

Can bundler automatically install the latest version based on my version of ruby (or restricted by other dependencies)?

I constantly run into a problem where a Gemfile specifies to get the latest version of a gem, but given the constraints of my system I simply get an error because the latest version is not compatible with ruby. For example let's say I have: gem…
Angelo
  • 328
  • 4
  • 14
2
votes
1 answer

Why does "bundle install --path" break when "bundle install" works?

`require': LoadError: cannot load such file -- mysql2/mysql2 (Sequel::AdapterNotFound) I keep getting the above error only when I use bundle install --path. The moment I switch to regular bundle install everything works perfectly. After beating…
binarymason
  • 1,351
  • 1
  • 14
  • 31
2
votes
2 answers

How to handle Gemfile.lock with local gem repositories?

Introduction We have a Rails5 application, which is splittend in about 10+ engines and a core application, which mounts these engines. A engine in our case is a plain old rails engine defined as a gem and located in a dedicated git repository. The…
phortx
  • 849
  • 5
  • 21
2
votes
3 answers

Docker build unable to install pg gem in Sinatra project

I've reviewed all the posts on SO with similar errors installing the Postgres pg gem. My issue is unique: I can successfully add Postgres to my Sinatra Ruby project via the Gemfile and bundle install -- however when building the Docker image it…
chhhris
  • 355
  • 1
  • 4
  • 16
2
votes
1 answer

Global Gemfile in the user's home directory using rbenv: good idea?

I am using rbenv to manage my gems, locally in my projects but also globally, on a Linux box. When I bump my global ruby version (set in ~/.rbenv/version), I always forget to install some of my utility gems, that I need for development…
NicolasWebDev
  • 305
  • 1
  • 14
2
votes
3 answers

How to install gems based on Gemfile.lock (without Gemfile)

Usually, people will use bundle install to install gems. But it require Gemfile and Gemfile.lock(optional). My situation is a little different. I only have Gemfile.lock. So how can I install all these gems based on bundle command. I tried bundle…
agate
  • 956
  • 1
  • 7
  • 13
2
votes
1 answer

Problem deploying Refinery CMS with Capistrano

I have the following custom Refinery CMS engines in my gemfile: gem 'refinerycms-venues', '1.0', :path => 'vendor/engines', :require => 'venues' gem 'refinerycms-events', '1.0', :path => 'vendor/engines', :require => 'events' gem…
fregas
  • 3,192
  • 3
  • 25
  • 41
2
votes
2 answers

How to resolve heroku "You are trying to install in deployment mode after changing your Gemfile" error?

I know this question appears on SA already---but, nothing is resolving this issue for me. I understand that this simply indicates that my gemfile and gemfile.lock file are out of sync. Removing the gemfile.lock file and re-bundling should resolve…
hellion
  • 4,602
  • 6
  • 38
  • 77