Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundler is removing RUBY VERSION from Gemfile.lock

I'm having the opposite issue to this one. The Gemfile has:

source 'https://rubygems.org'
ruby '2.3.1'

At the end of my Gemfile.lock file is:

RUBY VERSION
   ruby 2.3.1p112

 BUNDLED WITH
    1.12.4

But when I run bundle install is always deleting RUBY VERSION regardless I'm using the same as the development team's version. Even I'm using a more recent bundler version than the used to generate the original Gemfile.lock file:

$ bundle -v
Bundler version 1.12.5
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Any ideas how can I stop this?

like image 702
Alter Lagos Avatar asked Jun 19 '16 03:06

Alter Lagos


People also ask

Can you update Gemfile lock?

Important! Gemfile. lock is automatically generated when you run bundle install or bundle update . It should never be edited manually.

Should I Gemfile lock version?

You should always include your Gemfile. lock if you are writing an application. The community seems to (largely) agree that you should include it in any Gems you create as well.

What is the difference between Gemfile and Gemfile lock?

The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile. lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.


1 Answers

After a couple of days I stumbled upon another problem where I had to run spring stop. After that it started to generate it correctly.
My bad for suspending my pc and have running those processes for weeks instead of trying the good old shutdown.

like image 182
Alter Lagos Avatar answered Nov 15 '22 16:11

Alter Lagos