使用Ruby on Rails在gcloud上发生502服务器错误

时间:2017-04-06 16:14:41

标签: ruby-on-rails ruby google-app-engine gcloud

我从github克隆后立即部署了一个应用程序。我做了捆绑安装和一切,服务器说

/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.0.2/lib/rails/app_loader.rb:40: 
warning: Insecure world writable dir /google/gopath/bin in PATH, mode 040777
/home/hwangjinsong/.gems/gems/activesupport-
5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is 
deprecated
/home/hwangjinsong/.gems/gems/activesupport-
5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is 
deprecated
=> Booting WEBrick
=> Rails 5.0.1 application starting in development on http://localhost:8080
=> Run `rails server -h` for more startup options
/home/hwangjinsong/.gems/gems/activesupport-
5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: 
constant ::Fixnum is deprecated
[2017-04-06 12:09:32] INFO  WEBrick 1.3.1
[2017-04-06 12:09:32] INFO  ruby 2.4.0 (2016-12-24) [x86_64-linux]
[2017-04-06 12:09:32] INFO  WEBrick::HTTPServer#start: pid=334 port=8080

但是当我转到页面时,https://agarlogin-1142.appspot.com/ 它说

错误:服务器错误

服务器遇到临时错误,无法完成您的请求。 请在30秒后再试一次。

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text="#000000" bgcolor="#ffffff"> 
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your 
request.<p>Please try again in 30 seconds.</p></h2>
<h2></h2>
</body></html>

提前谢谢。

1 个答案:

答案 0 :(得分:0)

这可以提供帮助:

出现此警告是因为您使用的是ruby 2.4.0

warning: constant ::Fixnum is deprecated When generating new model

在我们的应用程序代码中,我们大多数时候都不必担心这种变化。但像Rails这样的图书馆使用这类数字来做出某些决定。这些库需要支持Ruby 2.4和以前版本的Ruby。