Posts

Showing posts with the label imageUpload

If we are getting problem with FFMPEG || ffmpeg thumbnailer error in rails

If we are getting problem with FFMPEG  || ffmpeg thumbnailer error in rails Safely Remove FFMPEG First sudo apt-get --purge remove ffmpeg sudo apt-get --purge autoremove sudo apt-get install ppa-purge sudo ppa-purge ppa:jon-severinsson/ffmpeg sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install ffmpeg And try if you still have problem then, apt-get update apt-get install build-essential git curl gawk useradd -m guest su guest cd export LOCAL_BREW_ENV="$HOME/my_graphviz" mkdir -p "$LOCAL_BREW_ENV" git clone https://github.com/Linuxbrew/brew.git "$LOCAL_BREW_ENV" export PATH="$LOCAL_BREW_ENV/bin:$LOCAL_BREW_ENV/sbin:$PATH" export MANPATH="$LOCAL_BREW_ENV/share/man:$MANPATH" export INFOPATH="$LOCAL_BREW_ENV/share/info:$INFOPATH" export HOMEBREW_CACHE="$LOCAL_BREW_ENV/var/cache" export HOMEBREW_LOGS="$LOCAL_BREW_ENV/va

Uploading Images With Carrierwave to S3 on Rails

Uploading Images With Carrierwave to S3 on Rails In your gem file gem 'carrierwave', '0.10.0' gem "mini_magick" gem "fog" Run bundle install In app/models/Your_model_name.rb   mount_uploader :your_field_name, ImageUploader app/uploaders/image_uploader.rb class ImageUploader < CarrierWave::Uploader::Base     include CarrierWave::MiniMagick     storage :fog     def store_dir     "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"   end     version :large do     process resize_to_limit: [800, 800]   end     version :medium, :from_version => :large do     process resize_to_limit: [500, 500]   end     version :thumb, :from_version => :medium do     process resize_to_fit: [100, 100]   end     version :square do     process :resize_to_fill => [500, 500]   end   end Create a file in ditectory config/initializers/s3.rb CarrierWave.co