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

strscan dependency/version #2410

Closed
gdonald opened this issue Jan 12, 2022 · 3 comments
Closed

strscan dependency/version #2410

gdonald opened this issue Jan 12, 2022 · 3 comments

Comments

@gdonald
Copy link

gdonald commented Jan 12, 2022

Issue report

Question 1: What is the problem?

  • What is the expected behavior?

I expect my Rails app to run, like it has for years.

  • What is the actual behavior?

My Rails app does not run.

  • How can we reproduce it?

I upgraded (compiled from source) my Ruby from 2.7.4 to 2.7.5. I recompiled Passenger. I restarted Apache. I then get this error in the logs:

[ E 2022-01-12 00:39:03.6423 100375/T2p age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for
application /path/to/my/rails/app/current: The application encountered the following error: You have already
activated strscan 1.0.3, but your Gemfile requires strscan 3.0.1. Since strscan is a default gem, you can either
remove your dependency on it or try updating to a newer version of bundler that supports strscan as a default
gem (Gem::LoadError)

Question 2: Passenger version and integration mode:

Both 6.0.10 and 6.0.12 produce the same error for me.

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

Debian 10, Apache 2.4.51

Question 4: Passenger installation method:

source tarball

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

Rails 6.1.4, Ruby 2.7.5

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

No.

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

Ruby 2.7.4 works fine for me.

@minivdweek
Copy link

minivdweek commented Jan 13, 2022

I can confirm that this also happens when upgrading actionmailer to 7.0.1 when using Ruby 2.7.4, since actionmailer has a dependency on strscan as well (which is then included in the lockfile at the most recent version, 3.0.1).

As a workaround, locking the strscan version to 1.0.3 in your Gemfile until you upgrade Ruby to >=3 (which includes strscan 3.0.1 by default) will fix the issue. Or upgrade Ruby to >=3, if that's possible for you.

This issue feels like it may be either closely related to or caused by #2409

@gdonald
Copy link
Author

gdonald commented Jan 13, 2022

I can confirm, locking the strscan version to 1.0.3 in my Gemfile works. Thanks @minivdweek.

@CamJN
Copy link
Member

CamJN commented Apr 4, 2022

fixed, see: #2409

@CamJN CamJN closed this as completed Apr 4, 2022
smortex added a commit to smortex/puppetlabs-apache that referenced this issue Apr 4, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
smortex added a commit to smortex/puppetlabs-apache that referenced this issue Apr 4, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
smortex added a commit to smortex/puppetlabs-apache that referenced this issue Apr 4, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
smortex added a commit to smortex/puppetlabs-apache that referenced this issue Apr 6, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
skylar2-uw pushed a commit to uwgsit/puppetlabs-apache that referenced this issue May 12, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
skelz0r added a commit to etalab/admin_api_entreprise that referenced this issue May 16, 2022
skelz0r added a commit to etalab/admin_api_entreprise that referenced this issue May 16, 2022
skelz0r added a commit to etalab/admin_api_entreprise that referenced this issue May 16, 2022
The commit 229ddea introduces a bug on
Passenger:

```
App 2590953 output: Error: The application encountered the following
error: You have already activated strscan 3.0.1, but your Gemfile
requires strscan 3.0.3. Since strscan is a default gem, you can either
remove your dependency on it or try updating to a newer version of
bundler that supports strscan as a default gem. Gem::LoadError)()
```

A (temporary) workaround is to fix strscan to 3.0.1.

The issue seems to be this one:
phusion/passenger#2409

According to these issues, the best workaround is to use
`PassengerPreloadBundler` in order to load right versions of gems.

Ref phusion/passenger#2410 (comment)
daveseff pushed a commit to daveseff/puppetlabs-apache that referenced this issue Jul 19, 2022
The latest passenger include a new option to load ruby bundles earlier,
working around deployment issues.  See:
* phusion/passenger#2410
* phusion/passenger#2409
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

4 participants