0

Am using EngineYard to host my Rails 3.2 app. This application allows users to post images/assets. I save them in the public directory (using Paperclip Gem). Now, my problem is that - with a new deployment, I am having to manually copy over the assets to the CURRENT version.

Though, I could use AmazonS3, I still want to figure out if there is a way in EngineYard which lets me save/serve the assets from a different directory than the code, say /data/assets.

Please, let me know if you see any other alternate implementations too.

Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37

1 Answers1

1

Typically your structure would look like

/data
  myapp/
    shared/
      images 
    releases/
      20120613000000
      20120601000000
      ...
    current (symlink to one of the releases)

When you deploy, you symlink public/images to shared/images and so your images always get stored in a non release dependant location.

I would encourage you to use something like s3: you'll make things a lot easier for when you want to host the app on multiple instances.

Frederick Cheung
  • 83,189
  • 8
  • 152
  • 174