Ruby Puma-dev使用错误的Ruby版本
我一直在调试大约一个星期,但没有进步,所以我想我会把它带到这里。我一直在进行研究并盯着其他几个小时,但没有取得任何进展。目前在Ruby 2.6.5上运行PUMA-DEV。每当我运行puma-dev
时,这是我收到的错误消息。 (出于安全原因更改项目名称和其他一些):
* Directory for apps: /Users/(myname)/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: 9280
* HTTPS Server port: 9283
! Puma dev running...
! Booting app 'docugenerator-02fe76f7' on socket /Users/(myname)/.puma-dev/docugen/tmp/puma-dev-3410.sock
docugenerator-02fe76f7[3421]: sh: no job control in this shell
docugenerator-02fe76f7[3421]: Puma starting in single mode...
docugenerator-02fe76f7[3421]: * Version 4.3.8 (ruby 2.6.3-p62), codename: Mysterious Traveller
docugenerator-02fe76f7[3421]: * Min threads: 0, max threads: 5
docugenerator-02fe76f7[3421]: * Environment: development
docugenerator-02fe76f7[3421]: ! Unable to load application: Bundler::RubyVersionMismatch: Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5
docugenerator-02fe76f7[3421]: /Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:495:in `validate_ruby!': Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5 (Bundler::RubyVersionMismatch)
到目前为止我尝试过的事情是:
- 重新安装PUMA-DEV
- 重新启动计算机
- 更改
.env
和.powenv
- 更改
RBENV Global
至2.6.5
到目前为止,我还没有取得任何进展,每次重新加载页面或重新启动PUMA-DEV服务器时,我都会出现错误。感谢任何技巧或帮助。
I've been debugging this for about a week now with no progress so I thought I'd take it to here. I've been doing research and staring at other StackOverflow solutions for this for hours and haven't made any progress. Currently running puma-dev on ruby 2.6.5. Whenever I run puma-dev
this is the error message I get. (changing project names and some others for security reasons):
* Directory for apps: /Users/(myname)/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: 9280
* HTTPS Server port: 9283
! Puma dev running...
! Booting app 'docugenerator-02fe76f7' on socket /Users/(myname)/.puma-dev/docugen/tmp/puma-dev-3410.sock
docugenerator-02fe76f7[3421]: sh: no job control in this shell
docugenerator-02fe76f7[3421]: Puma starting in single mode...
docugenerator-02fe76f7[3421]: * Version 4.3.8 (ruby 2.6.3-p62), codename: Mysterious Traveller
docugenerator-02fe76f7[3421]: * Min threads: 0, max threads: 5
docugenerator-02fe76f7[3421]: * Environment: development
docugenerator-02fe76f7[3421]: ! Unable to load application: Bundler::RubyVersionMismatch: Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5
docugenerator-02fe76f7[3421]: /Library/Ruby/Gems/2.6.0/gems/bundler-2.1.4/lib/bundler/definition.rb:495:in `validate_ruby!': Your Ruby version is 2.6.3, but your Gemfile specified 2.6.5 (Bundler::RubyVersionMismatch)
Things I have tried so far are:
- Reinstalling puma-dev
- Restarting computer
- Changing
.env
and.powenv
- Changing
rbenv global
to 2.6.5
So far I've made no progress and I just get an error everytime I reload the page or restart the puma-dev server. Any tips or help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PUMA似乎在错误的Ruby版本中运行。 RBENV确定多种方式使用哪种红宝石版本(请参阅: https:// github 。最直接的方法是在项目中创建
.ruby-version
。.ruby-version
It seems that the puma is running in wrong ruby version. rbenv determines which ruby version to use by several ways (see: https://github.com/rbenv/rbenv#choosing-the-ruby-version ), and you need make sure the order of ruby versions that rbenv try to determines is correct. The most straightforward way is to create a
.ruby-version
in your project..ruby-version