dragonfly-gem

Move RefineryCMS from Local to Production

匆匆过客 提交于 2020-01-15 05:15:13
问题 We decided to try using RefineryCMS for our current project and have run into some issues. We began the project in a local development environment. The deadline is very quickly approaching. At first, we tried to move the project into production using a DreamHost server. There were issues with the images (Refinery uses Dragonfly), where our database dump wasn't brining any images over (or thumbnails). We have exhausted our resources and still can't find a solution to our problem. I've done

How do I find an image generated by Dragonfly with Cucumber/Capybara?

怎甘沉沦 提交于 2020-01-01 07:20:27
问题 In the comments to the solution for How do I find an image on a page with Cucumber/Capybara, somebody asked: I can't seem to figure how to get this to work with URLs generated by Dragonfly. They look like this: /media/BAh_some_long_string_AwIw/12_11_52_810_5x5.jpg?s=7e360000, where 5x5.jpg is my file name. I've tried something like: //img[@src="/media/ / #{image}?s=*"] but it doesn't work. Got any tips? – Ramon Tayag Feb 25 at 4:18 I have a similar problem, only worse - in my case, the

How to cache files over 1MB with rack/cache on Heroku?

时光怂恿深爱的人放手 提交于 2019-12-22 04:46:21
问题 I'm using a combination of Dragonfly and rack/cache hosted on Heroku. I'm using Dragonfly for uploaded assets. Thumbnails are processed on-the-fly and stored in rack/cache for fast delivery from memcached (via the Memcachier addon). Regular static assets are also cached in memcached via rack/cache. My problem is that any uploaded files over 1MB are causing a 500 error in my application. 2013-07-15T10:38:27.040992+00:00 app[web.1]: DalliError: Value too large, memcached can only store 1048576

Crop circular image with dragonfly rails

你说的曾经没有我的故事 提交于 2019-12-21 21:38:04
问题 I'm using dragonfly ~> 0.9.15 Given an image, I'm confused at how to use the convert method in dragonfly to crop a circular portion from the image with transparent background. I am able to use a direct image magick command to run it from command line but the example command I found uses actual files and I'm unaware of how to get the file while dragonfly processes it on the fly. Here's the actual command I took from a stack overflow question with imagemagick. https://stackoverflow.com/a/999563

Heading into 2013, should I go with Dragonfly or Paperclip or Carrierwave? [closed]

為{幸葍}努か 提交于 2019-12-21 03:32:39
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am just another average joe hoping to jump onto the social network bandwagon. I'd like to know which photo uploading/resizing gem I

refinerycms image not loading - dragonfly error

*爱你&永不变心* 提交于 2019-12-19 06:04:27
问题 I'm working on developing a refinerycms rails app that was working good locally and now i've moved it to my VPS and I was having issues with images that i uploaded through refinerycms not loading and i've been reading that i needed to upgrade my version of imagemagick. I upgraded from 6.2.8 to 6.7.8. Now the images all load on some pages, but not on the admin side. What is causing this issue? Here's the stacktrace of the error. Dragonfly::Shell::CommandFailed (Command failed (convert '/var

How get correct path default image using gem dragonfly?

◇◆丶佛笑我妖孽 提交于 2019-12-13 07:13:02
问题 I use for loading files gem dragonfly I have model Photo: class Photo < ApplicationRecord dragonfly_accessor :avatar do default 'public/avatar.png' end ................................ end When i call pry(#<#<Class:0x007f83508fb8f0>>)> @photo.avatar.url I get => "/media/W1siZmYiLCJwdWJsaWMvYXZhdGFyLnBuZyJdXQ/avatar.png?sha=338938a0ea07d56b" Setting file dragonfly. dragonfly.rb require 'dragonfly' # Configure Dragonfly.app.configure do plugin :imagemagick secret

Rails Dragonfly find files in use

别来无恙 提交于 2019-12-12 06:04:42
问题 We are using Dragonfly for file and image upload in the app and in the Rails Admin. Dragonfly in app part Users can apply for jobs and add their resume as attachment. When user uploads attachments and sucesfully apply for a job the files get deleted. Dragonfly in Rails Admin part Admins can create pages with attachments and images in the Rails Admin part, these attachments are linked via the specific tables. Problem When a user is applying for a job but doesn't finish the apply the files

Dragonfly Gem with ImageMagick and Passenger

雨燕双飞 提交于 2019-12-11 00:19:08
问题 I was having some problems getting the dragonfly gem to play nicely with passenger. Passenger doesn't seem to use the current $PATH so it can't find the convert binary. I've added some configuration to dragonfly which seems to solve the issue: require 'dragonfly/rails/images' Dragonfly[:images].configure do |c| c.convert_command = "/usr/local/bin/convert" # defaults to "convert" c.identify_command = "/usr/local/bin/convert" # defaults to "convert" end but the gem i'm working on is going to be

Image url in JSON (RABL, Dragonfly, Ruby on Rails)

自作多情 提交于 2019-12-10 23:47:58
问题 I'm using RABL gem, my user model has many posts users/show.rabl object @user attributes :id, :name child :posts do extends "posts/post" end posts/_post.rabl attributes :id, image: post.image.url I want to show post's image, but i have an error: undefined local variable or method "post" . But in posts/_post.html.erb i can use this <%= post.image.url =%> Images loaded by dragonfly gem. How can i get this image url in json format? 回答1: If this is a child-attribute you can append it back to the