Hey Dean,
Absolutely, you shouldn't really be using the heroku environment to store data
like this. If you stored data within the heroku app there would be no way to
know which dyno it was stored on in future and when you call that image from
the public directly it might only show up sometimes, as its only stored on one
dyno.
It looks like you are using paperclip to store images, paperclip is already
geared up to store images to s3 with just a few config changes. Its a far more
scalable way to do things as your app grows.
It takes a little getting used to at first but you will appreciate it once you
need to scale up and all you need to do is crank a dyno.
Steve
On 24 Sep 2010, at 20:24, Dean wrote:
> I'm new to Heroku and Rails. I've recently deployed a simple project-
> management site built on Michael Hartl's RailsTutorial sample app.
> When I go to delete a user or a project, I encounter the "Heroku has a
> read-only filesystem" error.
>
> Could I please get enlightenment from the group on how to best deal
> with this? Do I simply need to adjust some environment variables and
> store stuff in /tmp? Is Heroku designed with the assumption that I'll
> put my database on S3 and write/delete there rather than on Heroku?
>
> Thanks!
>
> Dean Richardson
> Genlighten.com
>
> A portion of the error text follows:
>
> Processing ProjectsController#destroy (for 75.205.61.162 at 2010-09-24
> 11:55:00) [DELETE]
> Parameters: {"action"=>"destroy", "_method"=>"delete",
> "authenticity_token"=>"FTy5blkpYaTrJqpww/DPHk/Gu6XfJ5qdMq9Pfyq/GAM=",
> "id"=>"12", "controller"=>"projects"}
> [paperclip] Deleting attachments.
> [paperclip] deleting /disk1/home/slugs/296626_1795474_1092/mnt/public/
> system/images/37/original/sealed_MT_circular_1.jpg
>
> Errno::EROFS (Read-only file system - /disk1/home/slugs/
> 296626_1795474_1092/mnt/public/system/images/37/original/
> sealed_MT_circular_1.jpg - Heroku has a read-only filesystem. See
> http://docs.heroku.com/constraints#read-only-filesystem):
> /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1298:in `unlink'
> /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1298:in `remove_file'
> /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1303:in `platform_support'
> /usr/ruby1.8.7/lib/ruby/1.8/fileutils.rb:1297:in `remove_file'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/heroku?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.