将Rails应用上传到Firebase [英] Upload rails app to firebase

查看:59
本文介绍了将Rails应用上传到Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以将Rails应用上传到Firebase?如果可以的话,有人可以告诉我我似乎无法做到这一点.我尝试从."更改公用路径的firebase.json文件.到"app/views/pages"并尝试进行部署,但消息不断显示在公用文件夹中找不到index.html".如果有人可以提前对此表示感谢.

I was wondering if there is a way to upload a rails app to firebase? If so can someone tell me how I can't seem to do it. I've tried altering the firebase.json file for my public path from "." to "app/views/pages" and try to deploy but a message keeps displaying that "can't find index.html in your public folder." If anyone can shed some light on this thanks in advance.

推荐答案

Firebase托管是一种服务于所谓的静态应用程序的产品,该应用程序仅包含客户端解释的文件. Firebase的服务器不会解释您上传的任何代码.因此,Firebase托管不适合托管您的Ruby-on-Rails应用程序.

Firebase hosting is a product to serve so-called static application, which consist only of files that the client interprets. Firebase's servers will not interpret any code that you upload. So Firebase hosting is not suited to host your Ruby-on-Rails application.

引用 Firebase托管的文档:

我们提供您所有的静态内容(html,js,图像等)

We deliver all your static content (html, js, images, etc)

更新:自2017年初以来,Firebase Hosting可以与Google Cloud Functions集成.这意味着现在可以 运行代码以响应对Firebase Hosting上文件的请求,例如以按需生成托管内容.目前,此功能仅限于Node.js代码.但这取决于Google Cloud Functions,因此请始终检查产品支持哪些语言,以查看可以集成到Firebase Hosting中的语言.

Update: since early 2017 Firebase Hosting can be integrated with Google Cloud Functions. That means that it is now possible to run code in response to requests to files on Firebase Hosting, e.g. to generate hosted content on demand. At the moment this feature is limited to Node.js code. But that is dependent on Google Cloud Functions, so always check what languages that product supports to see what can be integrated into Firebase Hosting.

这篇关于将Rails应用上传到Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆