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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:31:21+00:00 2026-05-18T01:31:21+00:00

This is my code in my model: def to_param require ‘unicode’ #{id}-#{Unicode::normalize_KD(-+name+-).downcase.gsub(/[^[:alnum:]]/,’-‘)}.gsub(/-{2,}/,’-‘) end I

  • 0

This is my code in my model:

def to_param
  require 'unicode'
  "#{id}-#{Unicode::normalize_KD("-"+name+"-").downcase.gsub(/[^[:alnum:]]/,'-')}".gsub(/-{2,}/,'-')
end

I needed the unicode feature because in the name of my certain entries, it consists of accent (foreign characters). Without the unicode it was set to replace the accent character with a -.

But the problem right now is it gives me the following error:

ActionView::TemplateError (no such file to load -- unicode) on line #50 of app/views/spots/index.html.erb:
47: 
48:               <% @shops.each do |spot| %>
49:                 <div id="<%= dom_id(shop) %>" class="item">
50:                   <a href="<%= shop_path(shop, :type => @type) %>">
51:                     <% if !shop.photos.blank? %>
52:                       <%= image_tag(shop.photos.last.url(:thumb), :class => 'thumbnail') %>
53:                     <% else %>

What should I do? 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-05-18T01:31:21+00:00Added an answer on May 18, 2026 at 1:31 am

    Try adding the unicode gem to your Gemfile:

    gem 'unicode'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following models: class Product < ActiveRecord::Base belongs_to :brand belongs_to :model accepts_nested_attributes_for
I have been stuck on a particular part of my website-to-be for a few
I am starting a project and i would like to be able to test
I'm using Rails 3, Uploadify, to send images to S3. Right now all the
I've got a Rails 3 app (using Mongodb and Mongoid if that makes a
I'm on Rails 2.3.5. Inside my application a user could book one or more
I have a pdf file attachment saved in the cloud. The file is attached
I am using ruby-aaws to return Amazon Products and I want to enter them
I think what I'm trying to do is pretty simple, and I'm really not

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.