成功地发布了一个测试应用程序之后,我正在尝试第一次部署GAE项目,并且我遇到了关于错误的Ruby版本的错误。我不确定它是否是其他宝石之一,但我对ROR或GCS并不熟悉,我不确定该怎么办。谢谢。
这是我的一些系统设置:
$ ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
$ rvm list
rvm rubies
* ruby-2.4.0 [ x86_64 ]
=> ruby-2.4.1 [ x86_64 ]
$ rails -v
Rails 5.0.2
宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.2'
ruby "2.4.1"
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 5.0.0.beta1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
#gem 'coffee-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :production do
gem "mysql2", "~> 0.3.0"
end
group :development, :test do
gem "sqlite3"
end
gem "rack"
gem "puma"
默认解释器当前是Ruby 2.3.3。您可以通过将版本名称写入应用程序目录中的.ruby-version
文件来指定其他Ruby版本。例如:
2.2.5
存在.ruby-version
文件时,运行时尝试下载并安装Ruby的指定版本。如果无法满足该版本,则在部署应用程序时会收到错误消息。
文档:https://cloud.google.com/appengine/docs/flexible/ruby/ruby/runtime