Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 28. Mar '18

Weird things with bundler (Ruby) (fixing Bundler problems)

An article from old myrtana

Bundler is a package installer for Ruby. It allows to install libraries (gems) not only to system directory, but into project directory (bundle with it).

gem install bundler

gem cannot be found

Reason 1: Gemfile.lock got messed in upload or just somehow don’t correspond with the Gemfile anymore. Upload again or run bundle install. But we do not do it in production and are using Capistrano or Vlad, right? :-D In this case not, I was using bare rsync and forgot to add --delete option, so it probably messed up some files. I don’t really know.

sir@imperatorka:sos-sso/git:(master)*/$ bundle
Fetching source index from https://rubygems.org/
Could not find paper_trail-3.0.3 in any of the sources
sir@imperatorka:sos-sso/git:(master)*/$ mv Gemfile.lock Gemfile.lock2
sir@imperatorka:sos-sso/git:(master)*/$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...


Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:

    bundle install --path vendor/bundle

to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.

Password: 

Easy, it works. Ok, I forgot to add --path vendor/bundle to bundle install.

Add Comment