RackSpace 有读写文件系统吗?

发布于 2024-08-14 18:04:55 字数 360 浏览 4 评论 0原文

我将 Ruby on Rails 应用程序部署到 Heroku,我意识到它们有一个只读文件系统 (http://docs.heroku.com/constraints#read-only-filesystem)。例如,这意味着我无法在本地缓存图像。我使用的是名为“Rio”(Ruby 输入/输出)的 Ruby gem,它可以让我将文件保存到我的 /public/images 目录中。有没有好的主机允许这样做?具体来说,我正在研究 Rackspace Cloud。在我尝试部署到其他地方之前提前了解真的很有帮助!

I deployed a Ruby on Rails app to Heroku, and I realized they have a read-only file system (http://docs.heroku.com/constraints#read-only-filesystem). This means I can't cache images locally, for example. I was using a Ruby gem called "Rio" (Ruby Input/Output), and that let me save files to my /public/images directory. Are there any good hosts that allow this? Specifically, I was looking at Rackspace Cloud. Would really help to know in advance before I try and deploy somewhere else!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

痴情 2024-08-21 18:04:55

我刚刚在 Google 上搜索“免费红宝石托管”,有很多很多结果。我建议仔细查看其中一些。

更新:我刚刚意识到 Heroku 排在该列表的首位,但还有很多其他的。

我承认我没有勤奋地检查每一个,看看他们是否允许你写入他们的文件系统。

我认为没有必要争先恐后地追求“云”产品。 “云”解决了您尚未遇到的问题。 “云”使您的应用程序“无限”可扩展,如果您做得很大,您的网站就会出现 SlashDotted 或其他情况。

您正在寻找的是廉价到免费的托管,这是由“做”虚拟托管(将很多人放在一个物理主机上以降低每个人的成本)或为贫穷的开源开发人员提供免费托管的提供商提供的。

I just Googled for "free ruby hosting" and there are lots and lots of results. I would suggest looking through some of those.

Update: I just realized Heroku comes up at the top of that list, but there are plenty of others.

I admit I wasn't industrious enough to check each one to see if they let you write to their file system.

I think it's not necessary to scramble after "cloud" offerings. "cloud" addresses a problem you don't have (yet). "cloud" makes your application "infinitely" scalable, should you strike it big, your site gets SlashDotted or whatever.

What you're looking for is cheap-to-free hosting, and that's offered by providers that "do" virtual hosting (putting a lot of people on one physical box to cut costs for each) or free hosting for poor open source developers.

柳絮泡泡 2024-08-21 18:04:55

如果您想使用 Heroku,一种解决方案是不要将图像托管在其位置。但在亚马逊。
您的应用程序可以对图像执行必要的操作,然后将它们发送到 Amazon S3 平台。
然后,当您想要显示图像时,只需链接到亚马逊上的图像即可。

Paperclip 允许您轻松地将图像发送到 S3。

One solution, if you want to use Heroku would be not to host the images at their place. But at Amazon.
Your application could do what's necessary with the images and then send them on Amazon S3 platform.
Then when you want to display an image, you can just link to it on Amazon.

Paperclip allows you to send images to S3 quite easily.

二智少女 2024-08-21 18:04:55

您不需要切换主机来完成此操作。

使用 Heroku,您可以写入 RAILS_ROOT/tmp 目录。只是不能保证它们在请求之间停留,因为不同的请求可以由不同的测功机提供服务,并且 tmp 目录会定期清除。

因此,您可以将图像获取到该目录,执行您需要的任何处理,然后将它们上传到 S3(如果您还没有使用它,我建议使用 Delayed::Job)。

You don't need to switch hosts to accomplish this.

With Heroku, you can write to the RAILS_ROOT/tmp directory. They just aren't guaranteed to stick around between requests, because different requests could be served from different dynos, and the tmp dir is cleared out periodically.

So you can fetch your images to that directory, do whatever processing your need, and then upload them to S3 (I'd recommend Delayed::Job for this if you aren't already using it).

自由如风 2024-08-21 18:04:55

我不确定heroku,但为了回答你关于Rackspace cloudFiles的问题,cloudfiles没有暴露块存储,而只是一个用于上传/检索/等文件的API。

有人认为,一些保险丝包装器至少可以在 Linux/Macosx 上将您的云文件公开为文件系统:

https:// github.com/redbo/cloudfuse/

还有 JungleDisk,它与 cloudfiles 紧密结合,但它是一个完整的基础设施。

I am not sure about heroku but to answer your question about Rackspace cloudFiles, there is no block storage exposed by cloudfiles but just an API to upload/retrieve/etc... the files.

There is thought some fuse wrapper that would expose your cloud files as a filesystem at least on Linux/Macosx :

https://github.com/redbo/cloudfuse/

there is JungleDisk as well which is tighten to cloudfiles but it's a whole complete infrastructure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文