Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:47:47+00:00 2026-06-11T21:47:47+00:00

I am trying to crop image using mini magick gem with carrierwave. I am

  • 0

I am trying to crop image using mini magick gem with carrierwave. I am facing following issue when i am creating user.

Errno::ENOENT in UsersController#create

No such file or directory - identify -ping /tmp/mini_magick20120919-5600-ai31ph.jpg

My Code :
model/user.rb

class User < ActiveRecord::Base

  attr_accessor :crop_x, :crop_y, :crop_h, :crop_w
    attr_accessible :username,:profile
  after_update :reprocess_profile, :if => :cropping?

  #field :username

  mount_uploader :profile, ProfileUploader

  def cropping?
    !crop_x.blank? and !crop_y.blank? and !crop_h.blank? and !crop_w.blank?
  end

  def profile_geometry
    #img = MiniMagick::Image.open(self.profile.large.path)
    #@geometry = {:width => img[:width], :height => img[:height] }
  end

  private

  def reprocess_profile
    #puts self.profile.large.path
    #img = MiniMagick::Image.open(self.profile.large.path)
    #crop_params = "#{crop_w}x#{crop_h}+#{crop_x}+#{crop_y}"
    #img.crop(crop_params)
    #img.write(self.profile.path)
    #profile.recreate_versions!
  end

end

uploader/profile_uploader.rb

# encoding: utf-8

class ProfileUploader < CarrierWave::Uploader::Base

  # Include RMagick or ImageScience support:
  #include CarrierWave::RMagick
  # include CarrierWave::ImageScience
  include CarrierWave::MiniMagick

  # Choose what kind of storage to use for this uploader:
  storage :file
  # storage :fog

  # Override the directory where uploaded files will be stored.
  # This is a sensible default for uploaders that are meant to be mounted:
  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

  def extension_white_list
   %w(jpg jpeg gif png)
  end

  version :large do
  end

  version :thumb do
    process :resize_to_fill => [100, 100]
  end

end

What would be the problem ? please suggest any solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:47:48+00:00Added an answer on June 11, 2026 at 9:47 pm

    Need to install imagemagick.
    In ubuntu:

    sudo apt-get install imagemagick
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is
I'm trying to develop image crop using JQuery. I use ajax to upload the
I am trying to crop the image using JQuery Jcrop plugin with Java Stuff,
I am trying to crop an image using CAShapeLayer with this code CALayer* contentLayer
i am trying to crop a gif image using the libMagick.so library. ./convert --version
In my iPad application, I'm letting the user select an image using the following
I am trying to crop and image using PHP and the GD library and
I'm running into an issue with my program when trying to crop an image
I am trying to crop an image using this rectangle.But Not getting how to
I'm trying to crop an image from the media gallery. I'm able to access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.