Heroku 上的部署错误
我在 Heroku 上成功部署了我的小应用程序,当我尝试检查其功能时,出现以下错误。
2011-05-13T07:04:01+00:00 app[web.1]: Errno::EACCES (Permission denied - /app/tmp/stream20110513-1-qan7po-020110513-1-19mvzny-0 or /app/public/system/photos/5/medium/Splash-Bird.png):
2011-05-13T07:04:01+00:00 app[web.1]: app/controllers/products_controller.rb:47:in `create'
2011-05-13T07:04:01+00:00 app[web.1]: app/controllers/products_controller.rb:46:in `create'
2011-05-13T07:04:01+00:00 app[web.1]:
2011-05-13T07:04:01+00:00 app[web.1]:
这和权限有关系吗?因为不同的操作再次发生此权限被拒绝
错误。请指导。
提前致谢。
I deployed my small application successfully on Heroku , and when I try to check its functioning , it gives the following error.
2011-05-13T07:04:01+00:00 app[web.1]: Errno::EACCES (Permission denied - /app/tmp/stream20110513-1-qan7po-020110513-1-19mvzny-0 or /app/public/system/photos/5/medium/Splash-Bird.png):
2011-05-13T07:04:01+00:00 app[web.1]: app/controllers/products_controller.rb:47:in `create'
2011-05-13T07:04:01+00:00 app[web.1]: app/controllers/products_controller.rb:46:in `create'
2011-05-13T07:04:01+00:00 app[web.1]:
2011-05-13T07:04:01+00:00 app[web.1]:
Has this something to do with the permissions? Because this Permission denied
error is occurring for different actions time again. Please guide.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您似乎正在尝试在 Heroku 实例上存储数据,这是不允许的 。使用其他位置存储图像,为什么不尝试 Amazon S3?
It seems you are trying to store data on your Heroku instance, which is not allowed. Use another place to store your images, why not try Amazon S3?
您可能正在使用 Paperclip,它默认将图像和缩略图存储在本地文件系统上。正如 Pal 提到的,你不能在 Heroku 上写入文件。幸运的是,Paperclip 内置了对存储到 S3 的支持。 “您可以在 Paperclip::Storage::S3 的说明中找到有关 S3 存储的更多信息。”
You are probably using Paperclip, which defaults to storing the images and thumbnails on the local filesystem. As Pal mentioned, you cannot write files on Heroku. Luckily, Paperclip has built in support for storing to S3. "You can find more information about S3 storage at the description for Paperclip::Storage::S3."