gpt4 book ai didi

ruby-on-rails - Rails Server 在 Ubuntu 上启动失败(之前是在 MAC 上),直接退出

转载 作者:太空宇宙 更新时间:2023-11-04 12:35:52 25 4
gpt4 key购买 nike

按照我的问题 here ,我现在设置了一个 linux 系统,试图让它运行。重复:

  • 我在 MAC OS X 系统上使用 RoR v 4.2.4 开发了一个网站
  • 我们需要对这个网站进行一些适配,然后部署到服务器上(服务器以后可以使用新的linux系统)

这次我可以毫无问题地更新所有的 gem。 bundle check 表示所有依赖项都已满足。不幸的是,当我尝试启动服务器以使用 rails server 测试网站时,出现以下错误

    Array values in the parameter to `Gem.paths=` are deprecated.
Please use a String or nil.
An Array ({"GEM_PATH"=>["/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0", "/home/XWebsite/.gem/ruby/2.4.0"]}) was passed in from bin/rails:3:in `load'
/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
=> Booting Puma
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
/home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
... 4088 levels...
from /home/XWebsite/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/XWebsite/XWebsite/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

我们也尝试将 Webrick 作为服务器,但错误是相同的,除了:'Booting WEBrick'

使用 rails new blog 创建/开发一个新网站并运行服务器在 linux 系统上完美运行。

非常感谢您的提前帮助

最佳答案

  1. 捆绑更新 Spring
  2. bundle exec spring binstub --remove --all
  3. bundle exec spring binstub --all

关于ruby-on-rails - Rails Server 在 Ubuntu 上启动失败(之前是在 MAC 上),直接退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41876384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com