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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:30:20+00:00 2026-06-03T09:30:20+00:00

i have searched a lot. I’m facing this error Create method in Controller is

  • 0

i have searched a lot.
I’m facing this error
enter image description here

Create method in Controller is

def create
@category = Category.new(params[:category])

respond_to do |format|
  if @category.save
    format.html { redirect_to @category, notice: 'Category was successfully created.' }
    format.json { render json: @category, status: :created, location: @category }
  else
    format.html { render action: "new" }
    format.json { render json: @category.errors, status: :unprocessable_entity }
  end
end
end

My Form is

<%= form_for @category, :html => { :multipart => true } do |f| %>
<% if @category.errors.any? %>
<div id="error_explanation">
  <h2><%= pluralize(@category.errors.count, "error") %> prohibited this category from   being saved:</h2>

  <ul>
  <% @category.errors.full_messages.each do |msg| %>
    <li><%= msg %></li>
  <% end %>
  </ul>
  </div>
  <% end %>

 <div class="field">
  <%= f.label :name %><br />
  <%= f.text_field :name %>
 </div>
 <div class="field">
   <%= f.label :description %><br />
   <%= f.text_area :description%>
 </div>

 <div class="field">
    <%= f.file_field :image %>
 </div>

 <div class="actions">
    <%= f.submit %>
 </div>
 <% end %>

When i select the file to upload and click submit button not proceed

My Uploader is

# encoding: utf-8
require 'carrierwave/processing/rmagick'
class ImageUploader < CarrierWave::Uploader::Base

#Include RMagick or MiniMagick support
include CarrierWave::RMagick

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

# 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 scale(width, height)
 # do something
end

# Create different versions of your uploaded files:
  version :thumb do
  process :resize_to_fill => [80, 80]
  end

end
  • 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-03T09:30:22+00:00Added an answer on June 3, 2026 at 9:30 am

    i have Create the new project, apply everything in the same way and its working, still don’t know why this error occurred but now i have no problem.

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

Sidebar

Related Questions

I am new to this and have searched a lot this week. I am
I have searched a lot about this topic and I can't get this code
HI! I have searched a lot, but I didn't find the answer to this
I am sorry, if this question sounds stupid, but I have searched a lot
I have searched lot for this answer but there is no near answer for
I have searched a LOT for this and could not find a decent solution.
I have searched a lot on this topic. I found one answer on stackoverflow,
i have searched lot for the similar question and i decided to ask this
I have searched a lot about the difference between Website and WebApplication but didn't
I have searched a lot and tried much but I can not find the

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.