- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在运行 google app engine - ruby on rails 示例一切顺利,直到我必须部署应用程序为止。
google app engine ruby on rails tutorial
这是导致错误的控制台输出
Beginning deployment...
If this is your first deployment, this may take a while...done.
Verifying that Managed VMs are enabled and ready.
Building and pushing image for service [default]
Started cloud build [c80b8677-2cff-4341-a6f7-b97a55b5fb83].
To see logs in the Cloud Console: https://console.developers.google.com/logs?project=cloud-compute-rails&service=cloudbuild.googleapis.com&key1=c80b8677-2cff-4341-a6f7-b97a55b5fb83&logName=projects/cloud-compute-rails/logs/cloudbuild
----------------------------- REMOTE BUILD OUTPUT ------------------------------
starting build "c80b8677-2cff-4341-a6f7-b97a55b5fb83"
FETCHSOURCE
Fetching storage object: gs://staging.cloud-compute-rails.appspot.com/us.gcr.io/cloud-compute-rails/appengine/default.20160427t004918:latest#1461714651629000
Copying gs://staging.cloud-compute-rails.appspot.com/us.gcr.io/cloud-compute-rails/appengine/default.20160427t004918:latest#1461714651629000...
Downloading file:///tmp/source-archive.tgz: 0 B/203.33 KiB Downloading file:///tmp/source-archive.tgz: 72 KiB/203.33 KDownloading file:///tmp/source-archive.tgz: 144 KiB/203.33 Downloading file:///tmp/source-archive.tgz: 203.33 KiB/203.33 KiB
FETCHBUILDER
BUILD
+ docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
+ cat Dockerfile
# This Dockerfile for a Ruby application was generated by gcloud.
# The base Dockerfile installs:
# * A number of packages needed by the Ruby runtime and by gems
# commonly used in Ruby web apps (such as libsqlite3)
# * A recent version of NodeJS
# * A recent version of the standard Ruby runtime to use by default
# * The bundler gem
FROM gcr.io/google_appengine/ruby
# Install 2.2.3
if not already preinstalled by the base image
RUN cd /rbenv/plugins/ruby-build && \
git pull && \
rbenv install -s 2.2.3
&& \
rbenv global 2.2.3
&& \
gem install -q --no-rdoc --no-ri bundler --version 1.11
ENV RBENV_VERSION 2.2.3
# Copy the application files.
COPY . /app/
# Install required gems.
RUN bundle install --deployment && rbenv rehash
# BUG: Reset entrypoint to override base image.
ENTRYPOINT []
# Start application on port $PORT.
CMD bundle exec rackup -p 8080 -E production config.ru
+ docker build --tag us.gcr.io/cloud-compute-rails/appengine/default.20160427t004918:latest /workspace
Sending build context to Docker daemon 545.3 kB
Step 1 : FROM gcr.io/google_appengine/ruby
---> 3e6d0d6d0575
Step 2 : IF
Unknown instruction: IF
ERROR
ERROR: build step "gcr.io/cloud-builders/dockerizer" failed: exit status 1
ERROR: (gcloud.preview.app.deploy) Error Response: [2] Build failed; check build logs for details
有什么线索吗?
最佳答案
修复第一个(如果你的应用程序中没有dockerfile,它应该自动生成。)
转到部署失败的 ruby 示例文件。 (我的是如下所示的“2-cloud-sql”)
$ cd 2-cloud-sql
然后我执行了下一个命令。
$ gcloud preview app gen-config --custom
如果你质疑“现在更新?”回答是(是)。然后“app.yaml”文件成为自定义文件,但原始文件保持原样,并制作“dockerfile”。
接下来我被要求更新一些 Cloud SDK 组件,所以在下面编写命令。
$ gcloud components update
我在下面做了
$ bundle install
在我的例子中,这 3 个地方(在黄色方 block 中)被缩进并且不自然地转到下一行。~但是在另一个谷歌教程中,没有这样奇怪的行,所以在那种情况下我不需要更改“dockerfile” .请看dockerfile看看下面有没有像我这样改的地方~
所以我像这样修复了这些奇怪的部分。
在“if”之前有一个奇怪的换行,在“&&\”之前也是如此。
修复并保存 Dockerfile 后
我像谷歌指令一样执行了这些命令。
$ RAILS_ENV=production rake assets:precompile
$ gcloud preview app deploy
以上就是我的全部,希望对你有所帮助。
关于ruby-on-rails - ERROR : (gcloud. preview.app.deploy) 错误响应:[2] 构建失败;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36877926/
我在使用以下代码时遇到问题: function http_file_exists($url){ $f=fopen($url,"r"); if($f){ fclose($f); retu
我已经通过 Git 部署到 Azure 几个月了,没有出现重大问题,但现在我似乎遇到了一个无法克服的错误。 我创建了一个新的 Azure 网站,为正在开发的项目创建单独的预览链接。我在新站点上设置了
我已经通过flutter创建了一个App并完成了它,我想在flutter文档中阅读时进行部署。 我收到此错误: FAILURE: Build failed with an exception. * W
我在Windows 10中使用一些简单的Powershell代码遇到了这个奇怪的问题,我认为这可能是我做错了,但我不是Powershell的天才。 我有这个: $ix = [System.Net.Dn
我正在尝试使用 RapidJSON 解析从服务器接收到的数据。以下是收到的确切字符串: [ { "Node": "9478149a08f9", "Address": "172.17
我尝试为 ios 编译 OpenCV。我总是收到这些错误。我用不同版本的opencv试了一下,结果都是一样的。 我运行这个:python 平台/ios/build_framework.py ios_o
我在一台机器上做基本的发布/订阅,我的客户端是 StackExchange-Redis 的 C# 客户端,我在同一台机器上运行基于 Windows 的 Redis 服务器(服务器版本 2.8.4) 当
我有这段代码,但无法执行,请帮我解决这个问题 连接 connect_error) { die ("connection failed: " . $terhubung->connect_erro
我在 tomcat 上运行并由 maven 编译的 Web 应用程序给出了以下警告和错误。我可以在本地存储库中看到所有 JAR,但有人可以帮忙吗。 WARNING: Failed to scan JA
我正在 Windows 8 上使用 Android Studio 开发一个 android 应用程序,我正在使用一些 native 代码。突然间我无法编译我的 C 文件。当我运行 ndk-build
下面的代码对类和结构的成员进行序列化和反序列化。序列化工作正常,但我在尝试使用 oarch >> BOOST_SERIALIZATION_NVP(outObj); 反序列化时遇到了以下错误; 代码中是
如果我运行此命令“rspec ./spec/requests/api/v1/password_reset_request_spec.rb”,此文件中的所有测试都会通过。 但是,当我运行“rspec”时
我在尝试执行测试以使用 Protractor 上传文件时出错,我的代码是这个 it('it should be possible to upload a file', function() {
System.loadLibrary("nativefaceswap"); 当我运行我的应用程序时,我在 Android Studio 中发现了此类错误。在logcat中显示: java.lang.U
我希望有人能帮助我!使用任何方法或命令行的任何 SSL/HTTPS 调用均无效。 我在 Windows 10 中使用 Ubuntu Server 18.04 作为子系统。我的问题是昨天才开始出现的,因
通过删除这两个值将日期字段从 null=True 和 Blank=True 更改为 required 时,使用 db.alter 命令时遇到问题。 当以下行被注释掉时,迁移运行不会出现问题。
我第一次使用 Heroku 尝试创建应用程序(使用 SendGrid 的 Inbound Parse Webhook"和 Twilio SMS 通过电子邮件发送和接收 SMS 消息)。通过 Virtu
我正在将我的 swift 项目更新到 Xcode 7 上的 Swift 2.0。xcode 在构建项目时报告了以下错误: 命令/Applications/Xcode.app/Contents/Deve
在我的代码中,SSL 库函数 SSL_library_init() 没有按预期返回 1。我如何才能看到它返回了什么错误? 我在 SSL_library_init() 之后调用了 SSL_load_er
我正在尝试运行在以下链接中找到的答案: Asynchronously Load the Contents of a Div 但是当我这样做时,我会遇到我不太理解的错误。 我的代码: $(documen
我是一名优秀的程序员,十分优秀!