Google App Engine 上的 Ruby on Rails 应用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3278745/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Ruby on Rails app on Google App Engine
提问by Albus Dumbledore
Can anyone give me some pointers on how I could deploy my rails app to GAE? I've been reading about it, but it seems to be a fairly complicated task.
谁能给我一些关于如何将我的 rails 应用程序部署到 GAE 的指示?我一直在阅读它,但这似乎是一项相当复杂的任务。
I tried with the google-appenginegem, but its not a piece of cake either.
我试过google-appengine宝石,但它也不是小菜一碟。
Has there been any progress with the DataMapperadapter or will I need to make changes to my models?
DataMapper适配器是否有任何进展,或者我是否需要对我的模型进行更改?
I was hoping to see a full-detail tutorial about it, but those that I found were somewhat out-of-date.
我希望看到关于它的完整详细教程,但我发现的那些有些过时了。
采纳答案by bjg
Deploying Rails on Google's App Engine has become a lot easier than it used to be. There are a couple of caveats you should be aware of:
在 Google 的 App Engine 上部署 Rails 变得比以前容易多了。您应该注意以下几点:
- App Engine only supports the Python and Java environments so for Rails you will be deploying on JRuby
- App Engine's datastore is based on BigTable so you won't be able to use ActiveRecord on a relational database (if you want your datastore hosted in AppEngine). But as @Geoff Lanotte as pointed out there is a Datamapper adapter you can use
- Pre-deployment testing is done within Google's sandbox tools as opposed to things like
script/server
- App Engine 仅支持 Python 和 Java 环境,因此对于 Rails,您将在JRuby上部署
- App Engine 的数据存储区基于 BigTable,因此您将无法在关系数据库上使用 ActiveRecord(如果您希望将数据存储区托管在 AppEngine 中)。但是正如@Geoff Lanotte 指出的那样,您可以使用一个 Datamapper 适配器
- 部署前测试是在 Google 的沙盒工具中完成的,而不是像
script/server
Some other resources you might consider:
您可能会考虑的其他一些资源:
http://code.google.com/p/appengine-jruby/
http://code.google.com/p/appengine-jruby/
http://rails-primer.appspot.com/
回答by Maciej
You can deploy Ruby on Rails on Google Compute Engineif it works for you. Compute Engine is Iaas (Infrastructure as a Service) and it is used by Google App Engine, which is PaaS (Platform as a Service). Compute Engine is one abstraction layer lower (you can access OS resources, like: file system, network etc.).
如果它适合您,您可以在Google Compute Engine上部署 Ruby on Rails 。Compute Engine 是 Iaas(基础设施即服务),它被 Google App Engine 使用,它是 PaaS(平台即服务)。Compute Engine 是更低的抽象层(您可以访问操作系统资源,例如:文件系统、网络等)。
Detailed instructions:http://startup-with-gae.blogspot.com/2015/08/how-to-deploy-ruby-on-rails-application.html
详细说明:http : //startup-with-gae.blogspot.com/2015/08/how-to-deploy-ruby-on-rails-application.html

