carrierwave

Rails Carrierwave upload multiple files undefined method `[]' for nil:NilClass

Deadly 提交于 2019-12-11 06:11:54
问题 someone please can clarify why this undefined method `[]' for nil:NilClass is happening on upload files with rails, carrierwave and react? the rest of the code are very standard, so in the logs on upload image always the image attribute from post_attachments shows blank. i suspected that the problem is with the rails loop over the post_attachments on post create, what do you guys think? and i changed to params[:post_attachments].each do |image| img = PostAttachment.new img.image = image @post

Serving files through a controller with carrierwave and restricts with Pundit gem on Post model

亡梦爱人 提交于 2019-12-11 05:44:04
问题 I'm trying to upload a file of a photo with carrierwave and restrict(for be protected of others who don't be allowed to watch that file and after do this action until the post be published) the file with pundit. So I create another controller for Attachments: class AttachmentsController < ApplicationController def show attachment = Attachment.find(params[:id]) authorize attachment, :show? send_file attachment.file.path, disposition: :inline end end My AttachmentPolicy: class AttachmentPolicy

HTTP 401 Fog::Storage::Rackspace::ServiceError

主宰稳场 提交于 2019-12-11 05:19:43
问题 i am working to get with Rails 4 / Ruby 2 fog / carrierwave integration. Basically I have in my app after around a day of the unicorn servers running it is returning: [HTTP 401] Fog::Storage::Rackspace::ServiceError I then query the server, and check if I can manually hit the server, and have no issues. So I am very lost and what to do. F, [2013-06-17T00:47:58.519007 #31200] FATAL -- : ActionView::Template::Error ([HTTP 401] Fog::Storage::Rackspace::ServiceError): 21: <li class="span4"> 22:

Rails carrierwave + jcrop + bootstrap

谁说我不能喝 提交于 2019-12-11 05:09:00
问题 I'm using Rails 4 with gems mini_magick, carrierwave, jcrop-rails-v2 and bootstrap-sass. I have a picture upload that crops the image after save it but i need to crop it before save on a bootstrap modal. Found this tutorial: http://mark.stratmann.me/content_items/image-cropping-with-rails-3-2-carrierwave-bootstrap-modals-jcrop but I'm new on Rails and it seems to complex and I don't know how to merge this things with my code. Other thing that i need to do and don't know how, is keep the

CarrierWave RMagick - How do I cause manipulate! to be called?

﹥>﹥吖頭↗ 提交于 2019-12-11 04:38:52
问题 Greetings wise people, I am trying to use MiniMagick with CarrierWave in Rails 3 to resize and store an image according to the instructions here: http://carrierwave.rubyforge.org/rdoc/classes/CarrierWave/MiniMagick.html I can upload images with no processing. The image is uploaded and I can see it in the directory and the application. But when I try to perform processing on the image, the block inside manipulate! method is never being called. Do you know how I can solve this? I have the

rails 5 carrierwave no route matches for image

核能气质少年 提交于 2019-12-11 03:09:59
问题 I need some help. I am using rails 5 and carrierwave to upload images. the issue I am having is the images are saved but will not display, I get a no route matches GET..... I am storing the images in a uploads folder at Rails.root since I do not want them saved in the public dir. image_uploader.rb def store_dir "uploads/#{model.user_id}/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end carrier_wave.rb require 'carrierwave/orm/activerecord' require 'carrierwave' CarrierWave

Carrierwave + Mongoid + gridfs + Padrino admin image upload

爷,独闯天下 提交于 2019-12-11 02:49:44
问题 i'm trying to get carrierwave + mongoid + gridfs to work for uploading images via padrino admin and then showing on front-end. at a loss as to glue everything. can someone help? following https://blog.engineyard.com/2011/a-gentle-introduction-to-carrierwave/ and https://github.com/carrierwaveuploader/carrierwave-mongoid. trying to persist an "Artwork" with an image upload returns: NoMethodError at /admin/artworks/update/53a0eedcf2c7961066000002 undefined method ` bson_dump ' for # file: hash

ffmpeg conditional rotation of video

一世执手 提交于 2019-12-11 02:34:31
问题 I'm having issues uploading portrait videos using the Carrierwave-Video gem. When portrait videos are uploaded (particularly video captured on mobile devices), they are rotated 90 degrees clockwise. In the Carrierwave-Video documentation, there's an option for dynamic configuration, but I don't see a way to dynamically pass custom parameters for transcoding the video based on video orientation. I know that if I run the following line, I'm able to rotate the video 90 degrees CCW: encode_video(

multiple image uploads in a nested form with carrierwave

微笑、不失礼 提交于 2019-12-11 01:51:18
问题 I'm following railscasts episode 381 in an attempt to allow multiple image uploads to my app with the carrierwave gem & jQuery File upload. My app is for a college project & is set up with a hikingtrails model which has many & accepts nested attributes for a pics model . After I set the multiple option of the file_field to true & hard-coding the input name attribute i.e. <%= form.file_field :image, multiple: true, name: "pic[image]" %> , carrierwave stops working, it doesn't upload a single

rails carrierwave backgrounder with delayed jobs taking too much time to upload

喜欢而已 提交于 2019-12-10 22:18:19
问题 I am using carrierwave and carrierwave backgrounder(https://github.com/lardawge/carrierwave_backgrounder) with delayed job for uploading file in a background.whernver i try to upload my file, it uploads successfully and i can see that jobs are executed in the background , but i cant see any difference with using delayed job and without using delayed job.it takes same time to execute without delayed job as it takes with delayed job.dont know what went wrong plz help.Thanks in advance. here is