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

ERB.new arguments deprecated #2417

Closed
dmalan opened this issue Mar 12, 2022 · 6 comments
Closed

ERB.new arguments deprecated #2417

dmalan opened this issue Mar 12, 2022 · 6 comments

Comments

@dmalan
Copy link

dmalan commented Mar 12, 2022

Question 1: What is the problem?

  • What is the actual behavior?

Deprecation notices appear on startup, re https://github.com/phusion/passenger/blob/stable-6.0/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb#L282:

/usr/lib/ruby/vendor_ruby/phusion_passenger/standalone/start_command/nginx_engine.rb:282: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
/usr/lib/ruby/vendor_ruby/phusion_passenger/standalone/start_command/nginx_engine.rb:282: warning: Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.
  • How can we reproduce it?
git clone https://gist.github.com/b6141f5d2730df8e28ff8961bc896bab.git
cd b6141f5d2730df8e28ff8961bc896bab
docker compose up

Question 2: Passenger version and integration mode:

Passenger 6.0.12-1~focal1 standalone

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

Ubuntu 20.04 LTS x86_64

Question 4: Passenger installation method:

[x] Phusion APT repo

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

Ruby 3.1.1p18

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

Docker 20.10.12 using https://github.com/cs50/server/blob/main/Dockerfile, which is based on https://github.com/cs50/cli/blob/main/Dockerfile.

Thank you!

@CamJN
Copy link
Member

CamJN commented Apr 10, 2022

7bd1035

@CamJN CamJN closed this as completed Apr 10, 2022
@dmalan
Copy link
Author

dmalan commented Apr 10, 2022

Thank you, @CamJN!

@proigor
Copy link

proigor commented Apr 14, 2022

Hi,
sorry if this is the wrong place to ask such question, but how to use this fix?
I'm using 'gem "passenger"' in gemfile and the latest 6.0.13 version doesn't include this fix.
Please, advise.

@CamJN
Copy link
Member

CamJN commented Apr 22, 2022

You'd need to wait for us to release the next version of passenger.

@RandieM
Copy link

RandieM commented May 19, 2022

For what it's worth, I am receiving the following deprecation warnings at start-up:

.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/passenger-6.0.13/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:182:` warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments. 

.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/passenger-6.0.13/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:182: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

@RandieM
Copy link

RandieM commented May 19, 2022

For what it's worth, I am receiving the following deprecation warnings at start-up:

.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/passenger-6.0.13/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:182:` warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments. 

.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/passenger-6.0.13/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb:182: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

Sorry, I didn't notice that the issue was closed. These additional warnings above are also gone by upgrading to Passenger 6.0.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants