Comments (13)
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:
- in s2i-ruby-container - the advantage being it's targeted for Ruby 2.7 solely
- in custom
assemble
script added to this app
from rails-ex.
FWIW doing this in s2i-ruby-container makes sense to me.
from rails-ex.
@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.
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.
Wouldn't it be easier to just delete the Gemfile.lock and problem solved?
from rails-ex.
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.
Or is it question for any generic Ruby/Rails app? Then probably the env variable could make a sense.
from rails-ex.
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.
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.
Also, if the BUNDLED WITH\n 1.16.4
is dropped altogether, it will IMHO work independently of Bundler version.
from rails-ex.
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.
@voxik or do you mean just the BUNDLED
part... didn't think of that.
from rails-ex.
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)
- OpenShift logging is disabled in production HOT 10
- templates are duplicated in container repository HOT 5
- PG::ConnectionBad with Openshift Deployment HOT 5
- List of changes HOT 1
- Rails container does not restart properly on OpenShift 4.x HOT 2
- Rails example issues HOT 13
- s2i with ruby 2.6 does not create secret_key_base HOT 3
- Testing issue creation for samples operator
- No Action Required !! Testing automation workflow HOT 1
- template is not running properly on OpenShift 4 HOT 2
- Standard welcome page contents HOT 5
- Update to Ruby on Rails 5.X HOT 2
- build failed with ruby-20-rhel7 s2i builder image HOT 2
- Update to Rails 5.1 HOT 2
- Document how to change for additional steps HOT 5
- Consistent example applications HOT 21
- rails-ex repo does not support ruby version below 2.3 HOT 5
- Can't send emails from my openshift v3 app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-ex.