views:

274

answers:

3

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!

+1  A: 

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.

Carl Smotricz
Hi Carl, thanks for the response. I'd say of all these, A Small Orange looks interesting. Not much space, but I'm sure that could be upgraded. Thanks for the suggestion here.
jt
+1  A: 

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.

Damien MATHIEU
Hey Damien, just as a follow up, I'm not looking to handle file attachments. I am fetching images remotely and then storing them on the server (legally of course). I'm a bit concerned about how much work is involved in sending images remotely (and fetching images remotely) via S3.
jt
Take a look at paperclip. You'll see the amount of work isn't that big.
Damien MATHIEU
A: 

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).

Luke Francl
I ended up doing this, thanks!
jt