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

The etc gem dependency causing a Gem::LoadError error #2283

Closed
toncid opened this issue Jun 4, 2020 · 5 comments
Closed

The etc gem dependency causing a Gem::LoadError error #2283

toncid opened this issue Jun 4, 2020 · 5 comments

Comments

@toncid
Copy link

toncid commented Jun 4, 2020

Please follow the steps below if you have found an issue with Passenger, or would like to request a feature.

Post to Stack Overflow instead if you are not sure, or if you have a question about your configuration.


Issue report

Fill in as much as possible so that we can understand, find and fix the problem.

Are you sure this is a bug in Passenger?
Please read our troubleshooting and debugging guides first:
https://www.phusionpassenger.com/library/admin/troubleshooting/
https://www.phusionpassenger.com/library/admin/

The problem is caused by a new gem dependency introduced in v6.0.5 via #2124.

 * Adds the 'etc' gem as an explicit dependency. Closes GH-2124.

The problem does not surface for v6.0.4.

Please try with the newest version of Passenger to avoid issues that have already been fixed

v6.0.5 is the latest one right now.

Question 1: What is the problem?

  • What is the expected behavior?
  • What is the actual behavior?
  • How can we reproduce it? Please try to provide a sample application (or Virtual Machine) demonstrating the issue. Otherwise, if we can't reproduce it, we might have to ask you a number of followup questions or run certain commands to try and figure out the problem.

Be as detailed as possible in your descriptions, include any logs and stack traces (don't just cut/paste the error, provide some logging before that too).

(if you are requesting a feature instead of reporting an issue, describe here what you have in mind and how it would help you)

Your answer:

The gem is installed normally (bundle install):

1591202459,,ui,message,    amazon-ebs: Fetching etc 1.1.0
1591202459,,ui,message,    amazon-ebs: Installing etc 1.1.0 with native extensions

But when asset precompilation is initiated (bundle exec rails assets:precompile), it fails:

1591202500,,ui,message,    amazon-ebs: bundler: failed to load command: rails (/var/www/server/vendor/bundle/ruby/2.6.0/bin/rails)
1591202500,,ui,error,==> amazon-ebs: Gem::LoadError: You have already activated etc 1.0.1%!(PACKER_COMMA) but your Gemfile requires etc 1.1.0. Since etc is a default gem%!(PACKER_COMMA) you can either remove your dependency on it or try updating to a newer version of bundler that supports etc as a default gem.
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler/runtime.rb:319:in `check_for_activated_spec!'
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler/runtime.rb:31:in `block in setup'
1591202500,,ui,error,==> amazon-ebs:   /usr/share/ruby/forwardable.rb:230:in `each'
1591202500,,ui,error,==> amazon-ebs:   /usr/share/ruby/forwardable.rb:230:in `each'
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler/runtime.rb:26:in `map'
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler/runtime.rb:26:in `setup'
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler.rb:107:in `setup'
1591202500,,ui,error,==> amazon-ebs:   /usr/local/share/gems/gems/bundler-1.17.3/lib/bundler/setup.rb:20:in `<top (required)>'
1591202500,,ui,error,==> amazon-ebs:   /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
1591202500,,ui,error,==> amazon-ebs:   /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'

Question 2: Passenger version and integration mode:

  • For example: open source 5.0.26 standalone; enterprise 5.0.21/nginx

Your answer:

v6.0.5 Standalone

Question 3: OS or Linux distro, platform (including version):

  • For example: Debian 8, x86_64 or OS X 10.10 Yosemite, x86_64

Your answer:

Amazon Linux 2, x86_64

Question 4: Passenger installation method:

Your answer:
[x] RubyGems + Gemfile
[ ] RubyGems, no Gemfile
[ ] Phusion APT repo
[ ] Phusion YUM repo
[ ] OS X Homebrew
[ ] source tarball
[ ] Other, please specify:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

  • For example: Ruby 2.3.0, RVM, Rails 5.0.0; Node.js 4.0.0 with Express 4.13.4

Your answer:

Ruby v2.6.3 (from the amzn2 yum repo), Rails v5.2.4.2, Bundler v1.17.3

Question 6: Are you using a PaaS and/or containerization? If so which one?

  • For example: Heroku, Amazon Container Services, Docker 1.9 with an image based on passenger-docker

Your answer:

No.

Question 7: Anything else about your setup that we should know?

Your answer:

Nothing else right now.


We strive for quality and appreciate you taking the time to submit a report! Please note that if you want guaranteed response times and priority issue support we encourage you to join our enterprise customer base. They also provide us with the means to continue our high level of open source support!

@CamJN
Copy link
Member

CamJN commented Jun 12, 2020

I'm probably going to revert this change in the next Passenger, as it was aimed at helping already broken ruby installs. In the meantime does specifying in the Gemfile the same version of the etc gem that is included with your ruby help? That way hopefully when bundler resolves Passenger's dep it will choose the same version.

@toncid
Copy link
Author

toncid commented Jun 15, 2020

Yes, specifying etc v1.0.1 in the Gemfile helps, but I do not see this as a good solution going forward. If the etc gem is somehow missing from the ruby installation, then it should be included explicitly. Just a documented advice should be sufficient.

@toncid
Copy link
Author

toncid commented Jul 8, 2020

Hello, do you know when Passenger with the fixed gemspec is expected?

@CamJN CamJN closed this as completed in 0f48bee Jul 13, 2020
@CamJN
Copy link
Member

CamJN commented Jul 27, 2020

6.0.6 is released with the fix.

@toncid
Copy link
Author

toncid commented Jul 27, 2020

Thanks!

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

No branches or pull requests

3 participants