Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version range instead of OSEM_RUBY_VERSION. #2646

Closed
wants to merge 1 commit into from

Conversation

AndrewKvalheim
Copy link
Member

@AndrewKvalheim AndrewKvalheim commented Mar 28, 2020

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the upstream master branch.
  • The tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I have added necessary documentation (if appropriate).

Short description of what this resolves

In order to accommodate variation in the version of Ruby across environments, the Gemfile is currently runtime-configurable via OSEM_RUBY_VERSION:

osem/Gemfile

Line 5 in e6f3aa5

ruby ENV['OSEM_RUBY_VERSION'] || '2.5.0'

This mechanism is incompatible with typical Docker environments since, by design, the runtime configuration has no effect on builds:

$ docker-compose build osem

Your Ruby version is 2.5.5, but your Gemfile specified 2.5.0

Furthermore, that it's apparently become routine to circumvent the Ruby specification raises the question of why that constraint exists at all. If users are typically expected to set OSEM_RUBY_VERSION, what purpose does the Ruby specification serve?

Changes proposed in this pull request

As with the other dependencies, specify a range of compatible versions. I've guessed at a conservative starting point:

ruby '~> 2.5.0'

@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #2646 into master will increase coverage by 1.64%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2646      +/-   ##
==========================================
+ Coverage    80.5%   82.15%   +1.64%     
==========================================
  Files         146      146              
  Lines        4832     4780      -52     
==========================================
+ Hits         3890     3927      +37     
+ Misses        942      853      -89
Impacted Files Coverage Δ
app/datatables/user_datatable.rb 100% <0%> (ø) ⬆️
app/models/user.rb 95.03% <0%> (+0.7%) ⬆️
app/helpers/users_helper.rb 92.85% <0%> (+7.14%) ⬆️
app/helpers/events_helper.rb 86.56% <0%> (+13.43%) ⬆️
app/helpers/date_time_helper.rb 92.85% <0%> (+14.28%) ⬆️
app/mailers/mailbot.rb 48.88% <0%> (+15.55%) ⬆️
app/helpers/application_helper.rb 93.47% <0%> (+17.39%) ⬆️
app/serializers/speaker_serializer.rb 100% <0%> (+20%) ⬆️
app/serializers/event_serializer.rb 100% <0%> (+29.16%) ⬆️
app/serializers/track_serializer.rb 100% <0%> (+33.33%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6f3aa5...8eb696b. Read the comment docs.

@isnuryusuf
Copy link

its work for me
solve problem:

Your Ruby version is 2.5.7, but your Gemfile specified 2.5.0
ERROR: Service 'production_web' failed to build: The command '/bin/sh -c export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 --without test development' returned a non-zero code: 18

AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this pull request May 31, 2020
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this pull request May 31, 2020
@AndrewKvalheim AndrewKvalheim mentioned this pull request Nov 11, 2020
1 task
@hennevogel
Copy link
Member

We don't really need 2.5, so this would limit us too much. Sorry, thanks anyway 💐

@hennevogel hennevogel closed this Mar 6, 2021
@AndrewKvalheim
Copy link
Member Author

The point is to document what you do need.

AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this pull request Jun 13, 2021
Targets:

    docker run --rm \
        registry.opensuse.org/opensuse/infrastructure/osem/containers/osem/base \
        ruby --version

See also:

  - openSUSE#2646
  - openSUSE#2680
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request Apr 23, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 8, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 15, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 16, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 17, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 22, 2024
AndrewKvalheim added a commit to SeaGL/osem that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants