部署到Google App Engine时出错

时间:2018-07-18 16:43:32

标签: google-app-engine

这是我在部署RUBY应用程序时在日志中遇到的错误。

错误

  

完成步骤1的步骤#1:命令'/ bin / sh -c bundle install   --deployment --without =“ development test” && rbenv rehash'返回了非零代码:18

2 个答案:

答案 0 :(得分:0)

从您提供的少量信息以及遇到的类似问题开始,我认为您是在Flex环境中部署Rails应用程序。查看它如何决定使用哪个Ruby版本:https://cloud.google.com/appengine/docs/flexible/ruby/runtime。按指定在应用程序的根目录中创建.ruby-version文件可能会有所帮助。就我而言,我在.ruby-version文件中指定了错误的版本:它与我的Gemfile中的版本不匹配,因此它给了我以下错误消息:

Step #1: Step 14/17 : RUN bundle install --deployment --without="development test" && rbenv rehash
Step #1:  ---> Running in <some random hash>
Step #1: Your Ruby version is 2.4.1, but your Gemfile specified 2.5.5
Step #1: The command '/bin/sh -c bundle install --deployment --without="development test" && rbenv rehash' returned a non-zero code: 18

答案 1 :(得分:0)

您尝试过捆绑更新。对我有用

相关问题