Ruby Puma-dev使用错误的Ruby版本

发布于 2025-01-19 09:36:23 字数 1394 浏览 4 评论 0原文

我一直在调试大约一个星期,但没有进步,所以我想我会把它带到这里。我一直在进行研究并盯着其他几个小时,但没有取得任何进展。目前在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

恋竹姑娘 2025-01-26 09:36:23

PUMA似乎在错误的Ruby版本中运行。 RBENV确定多种方式使用哪种红宝石版本(请参阅: https:// github 。最直接的方法是在项目中创建.ruby-version

.ruby-version

2.6.5

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

2.6.5
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文