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

/usr/local/lib/ruby/gems/2.2.0/gems/puma-3.9.0/lib/puma/launcher.rb:166:in run': undefined method clean_env' for Bundler:Module (NoMethodError) #1312

Closed
wangyuan99 opened this issue Jun 1, 2017 · 12 comments · Fixed by #1314
Labels

Comments

@wangyuan99
Copy link

Steps to reproduce

  1. ...rails new myapp

  2. ...cd myapp

  3. ...rails server

Expected behavior

should see:

=> Booting Puma
=> Rails 5.0.3 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
Puma starting in single mode...

  • Version 3.8.2 (ruby 2.2.3-p173), codename: Sassy Salamander
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://0.0.0.0:3000
    Use Ctrl-C to stop

Actual behavior

got this:

=> Booting Puma
=> Rails 5.0.3 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
Exiting
/usr/local/lib/ruby/gems/2.2.0/gems/puma-3.9.0/lib/puma/launcher.rb:166:in run': undefined method clean_env' for Bundler:Module (NoMethodError)

System configuration

Ruby version: 2.2.3
Rails version: 5.0.2

@wangyuan99
Copy link
Author

I was creating new rails applications, and start rails server, everything was working. Then I started creating new applications, then when i start rails server, I got that error message. All new application I created afterward, got that error message. Then I tried copy the previous working application, the copied application works fine too.

@nateberkopec
Copy link
Member

Run gem install bundler, make sure bundler -v says 1.15.0, then try again.

@nateberkopec
Copy link
Member

What's the best way for us to solve this? You can't do optional dependencies, so I guess we just have to have a code path for "bundler is defined but is old"

@matobinder
Copy link

I was too about to submit an issue on this, I'm stuck for a bit since I'm building apps in CloudFoundry and the ruby-buildpacks don't yet have the latest version of bundler.

Note I was just looking at bundler source, not that it would probably fix having an older version of bundler, but it looks like Bundler.clean_env is deprecated
https://github.com/bundler/bundler/blob/master/lib/bundler.rb#L257

@grosser
Copy link
Contributor

grosser commented Jun 2, 2017

#1314

@nateberkopec
Copy link
Member

@wangyuan99 @matobinder Can either of you try again with Puma master and tell me if that fixes the problem for you?

gem 'puma', github: 'puma/puma'

@matobinder
Copy link

Fixed it for me. I tried it with bundler 1.9.7 and bundler 1.15.1
Going against puma master (fec20f0)

@nateberkopec
Copy link
Member

Alright, I'll roll up a patch release in a few hours.

@magedmakled
Copy link

Worked for me as well. Thanks @nateberkopec

@nateberkopec
Copy link
Member

Fixed in 3.9.1, out now.

@wangyuan99
Copy link
Author

yeah, working now. thanks very much!

@tasos31
Copy link

tasos31 commented Jun 5, 2017

@nateberkopec Worked perfectly, thanks.

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

Successfully merging a pull request may close this issue.

6 participants