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 7890087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:15:47+00:00 2026-06-03T06:15:47+00:00

I have carrierwave with mongoid and I want validate atachment file size. I take

  • 0

I have carrierwave with mongoid and I want validate atachment file size.

I take a look to:

https://github.com/jnicklas/carrierwave/wiki/How-to%3A-Validate-attachment-file-size

but this fix it does not works for me.

I have paste my code in the end from https://gist.github.com/1009861

Please how validate atachment file size in carrierwave with mongoid?
Thank you

  • 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-03T06:15:48+00:00Added an answer on June 3, 2026 at 6:15 am

    I think your problem is current rails version not autoloading lib/ directory anymore.

    In your config/application.rb insert a line

    config.autoload_paths += Dir["#{config.root}/lib/**/"]
    

    to load modules in your lib/ (and it’s subdirectories).
    I’m using size check the way in the example, so pretty sure you can easily fix this issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small Rails 3.2.1 app that uses CarrierWave 0.5.8 for file uploads
How do you get the file extension in a CarrierWave Uploader? I have quite
I am using CarrierWave with MiniMagick to resize and uploaded file. I have the
I have Photo model and i implemented file uploading via CarrierWave (my app works
I am starting with carrierwave for file uploads and have been quite happy with
i have git clone git://github.com/jalagrange/excel_test_app.git I got the below error while the bundle install,
I have an application that is using both the carrierwave & tire gems. The
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have a model that use both: Carrierwave for store photos, and PaperTrail for
Have finally got a responsive site working (of a fashion). What I want to

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.