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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:19:37+00:00 2026-06-04T23:19:37+00:00

When users register, I want them to be able to upload an avatar. The

  • 0

When users register, I want them to be able to upload an avatar. The new registration .html.erb looks like this:

<h2>Sign up</h2>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:multipart => true} ) do |f| %>
<%= devise_error_messages! %>

<div>
<%= f.label :username %><br />
<%= f.text_field :name %>
</div>

<div>
<%= f.label :image %><br />
<%= f.file_field :image %>
</div>

<div><%= f.label :email %><br />
<%= f.email_field :email %></div>

<div><%= f.label :password %><br />
<%= f.password_field :password %></div>

<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>

<div><%= f.submit "Sign up" %></div>
<% end %>

<%= render "links" %>

User.rb:

class User < ActiveRecord::Base
    ....
    mount_uploader :image, ImageUploader

ImageUploader exists…

When I try to visit the view, it tells me that User::ImageUploader doesn’t exist. When I try to specify the fully qualified name of the class in the user model, either as an ‘include’ statement or as an argument to the mount_uploader function, it can’t find that either. Do I need to somehow build in a separate form_tag in that view? I’m sure this has been done before. Any help is appreciated.

  • 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-04T23:19:39+00:00Added an answer on June 4, 2026 at 11:19 pm

    Have you:

    1. Added an :image column to your User model?
    2. Defined the uploader app/uploaders/image_uploader.rb?
    3. Restarted your server?

    You shouldn’t need to have this as a separate form tag, as long as the image attribute exists on the User model.

    You may need to check your form markup. I notice you have :username on the label and :name on the field.

    Try changing:

    <%= f.label :username %><br />
    <%= f.text_field :name %>
    

    to

    <%= f.label :name, "username" %><br />
    <%= f.text_field :name %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After my users register the first time, I want them to have to fill
I want to create a web application that allows users to sign up, register
I want my web's register users to store their location (latitude & longitude) from
I want to build a web application where users can register and have a
In my web application i have registration form, when user register i want to
I am building a download site, An users will be able to register and
I'm building a site that offers functionality to users without requiring them to register.
So I'm making an app where I want the users to be able add,
Currently when new users register at my website, they have to fill out some
When a user registers with my site I want to offer them a login

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.