Coder Social home page Coder Social logo

Support Ruby 2.7 about rails-ex HOT 13 CLOSED

sclorg avatar sclorg commented on June 27, 2024
Support Ruby 2.7

from rails-ex.

Comments (13)

pvalena avatar pvalena commented on June 27, 2024

The ultimate solution would be to detect this "old Gemfile.lock" and update to new bundler using advised command. That can be either done with custom assemble scriplet (prepending the container one) or in the container's assemble script itself.

@hhorak @voxik WDYT? Should we bundle update --bundler in assemble on behalf of users app by default?


Note: there're two places (= assemble scripts) to solve this:

  1. in s2i-ruby-container - the advantage being it's targeted for Ruby 2.7 solely
  2. in custom assemble script added to this app

from rails-ex.

yselkowitz avatar yselkowitz commented on June 27, 2024

FWIW doing this in s2i-ruby-container makes sense to me.

from rails-ex.

hhorak avatar hhorak commented on June 27, 2024

@hhorak @voxik WDYT? Should we bundle update --bundler in assemble on behalf of users app by default?

I think Python container does something similar with pip as well, but not by default, only when UPGRADE_PIP_TO_LATEST is set (see https://github.com/sclorg/s2i-python-container/tree/master/3.8). I think updating it by default would be similar to the case we ship the upstream version, which is IMHO wrong from more reasons -- we nor users cannot control the version, upstream one can be broken, or changed too often... So, I'd personally prefer some bundler-alternative to UPGRADE_PIP_TO_LATEST.

from rails-ex.

yselkowitz avatar yselkowitz commented on June 27, 2024

Correct me if I'm wrong, but there seems to be a difference. UPGRADE_PIP_TO_LATEST actually updates pip, which is already present in the container. OTOH AFAICS bundle update --bundler installs the gems specified in the Gemfile.lock and then updates BUNDLED WITH in the Gemfile.lock to the new version. Even when I locally reverted #128 and ran bundle update --bundler, the only difference to the Gemfile.lock was BUNDLED WITH.

Furthermore, there is a fundamental difference between Python and Ruby (gems), in that the latter supports multiple parallel installed versions, so the versions that ship with the gem will still be present. FWIW, in the case of rails-ex pre #128, only rake ended up with different versions than it started with, and the added version (which was actually older) did not clobber the preexisting version.

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Wouldn't it be easier to just delete the Gemfile.lock and problem solved?

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Wouldn't it be easier to just delete the Gemfile.lock and problem solved?

I mean delete from the repository. Its value is dubious for simple example app without any nonstandard dependencies.

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Or is it question for any generic Ruby/Rails app? Then probably the env variable could make a sense.

from rails-ex.

hhorak avatar hhorak commented on June 27, 2024

Wouldn't it be easier to just delete the Gemfile.lock and problem solved?

I think the reason for existence of this file is that the upstream projects were faulty sometimes and the Gemfile.lock was supposed to make sure the example application works the same always and OpenShift users don't see errors caused by changes in the upstream gem files. Maybe there is a middle way -- to specify version more exactly, but not using Gemfile.lock?

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Or is it question for any generic Ruby/Rails app? Then probably the env variable could make a sense.

But then this is wrong place for this ticket and it should be discussed at https://github.com/sclorg/s2i-ruby-container/

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Also, if the BUNDLED WITH\n 1.16.4 is dropped altogether, it will IMHO work independently of Bundler version.

from rails-ex.

pvalena avatar pvalena commented on June 27, 2024

Wouldn't it be easier to just delete the Gemfile.lock and problem solved?

If we don't lock it CI tests may run into problems on upstream updates. That's why we have Gemfile.lock, to have reproducible results.

from rails-ex.

pvalena avatar pvalena commented on June 27, 2024

@voxik or do you mean just the BUNDLED part... didn't think of that.

from rails-ex.

voxik avatar voxik commented on June 27, 2024

Wouldn't it be easier to just delete the Gemfile.lock and problem solved?

If we don't lock it CI tests may run into problems on upstream updates. That's why we have Gemfile.lock, to have reproducible results.

At least we would move forward with the dependencies ....

@voxik or do you mean just the BUNDLED part... didn't think of that.

Yes, I tested the removal with Bundler 2.1.4 and it worked unless I made some mistake.

from rails-ex.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.