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

  • Home
  • SEARCH
  • 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 7876651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:11:59+00:00 2026-06-03T03:11:59+00:00

I got a class AvatarUploader < Carrierwave::Uploader::Base which store User avatars in public/uploads dir:

  • 0

I got a class AvatarUploader < Carrierwave::Uploader::Base which store User avatars in public/uploads dir:

  def store_dir
    "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

  version :main do
     process :resize_to_limit => [128, 128]
  end

And I want to start application in production mode with assets precompilation enabled. Everything but avatars work fine. When I visit any User profile I get:

Started GET "/users/1" for 127.0.0.1 at 2012-05-03 17:45:24 +0300
Processing by Users::UsersController#show as HTML
  Parameters: {"id"=>"1"}
  Rendered users/users/show.html.erb within layouts/application (2.5ms)
Completed 500 Internal Server Error in 16ms

ActionView::Template::Error ( isn't precompiled):
    87:                     <%= image_tag @user.avatar_url(:main).to_s %>
  app/views/users/users/show.html.erb:87:in `_app_views_users_users_show_html_erb___538221278131396366_28399560'

Maybe there is a way to turn off precompilation for avatars(because they could be re-uploaded when app is running on production). Please provide any suggestions how to fix this issue. Thanks.

  • 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-03T03:12:00+00:00Added an answer on June 3, 2026 at 3:12 am

    When image_tag receives a blank string, it tries to get a resource
    from the asset pipeline and returns

    “isn’t precompiled”

    https://github.com/rails/rails/issues/3080

    Print @user.avatar_url(:main).to_s to double check

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

Sidebar

Related Questions

I've got class named PagedList which looks like this: public class PagedList<T> : List<T>
We've got a base class for most of our domain object: public class AbstractEntity<TKey>
I've got a class which inherits from a List<MagicBean> . It works well and
I've got class which is using plain-only-data struct with const variables and I'm not
Say I got: class X_ { public: void do() { } } class Y_
I got this class which raises same type of exception, how do i capture
I got a class like this which gets returned from an ASP webservice: class
Let's say I've got class: class Bad_Date { private: const char* _my_msg; public: const
I got following class: public class Action { public Player player { get; private
OK, just got: class User include Mongoid::Document # devise stuff... has_one :card end class

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.