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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:27:36+00:00 2026-06-10T16:27:36+00:00

I’m trying to implement a star rating system in my rails application. I’ve opted

  • 0

I’m trying to implement a star rating system in my rails application. I’ve opted to use ajaxful-rating gem for this.

  • I’ve installed the Gem
  • I’ve ran the script
  • I’ve added ajaxful_rateable to my gear model to enable rating them.
  • I’ve added ajaxful_rater to my user model to enable rating other items.

I’m not completely through the installation because I’m running into errors with the routes. I need to know what I’m doing wrong on the routes or database. From the instructions on the gem it didn’t seem that I needed to augment the database except to cache the average rating. But I’m getting the following error when I try to access the view

Mysql2::Error: Table 'equiptme.rates' doesn't exist: SHOW FULL FIELDS FROM `rates`

Please help. My code is below.

Routes

  resources :gears, :member => {:rate => :post} do
    resources :calendars, :only => [:create, :destroy, :edit] 
    resources :comments, :only => [:create, :destroy] 
  end

View

        <% @comments.each do |comment| %>
            <div style="width: 99%; min-height: 190px; margin-bottom: 30px; border-bottom: 1px dotted #DAD9D9;">
                  <div style="width: 17%; float: left; overflow: hidden; margin-left: 10px; text-align: center; font-size: 14px; ">
                    <div class="gearcomments_userpic_container"><%= image_tag comment.user.userimage.url(:comments), :class => "gearcomments_userpic" %></div></br>
                    <%= comment.user.name %> 
                  </div>
                  <div style="width: 55%; float: left; margin-left: 10px; font-size: 13px;">
                    <%= comment.body %> 
                  </div> 
                  <div style="width: 15%; float: left; text-align: center;">
                     <h4>Overall Rating</h4></br>
                     <%= ratings_for @gear, :show_user_rating => true %>
                     <div></div></br>
                     <% # display delete link only for comments written by this particular user %>
                     <% if user_signed_in? and comment.user_id == current_user.id %>
                         <span><%= link_to 'delete', gear_comment_path(@gear, comment), :confirm => 'Are you sure?', :method => :delete, :class => "" %></span>
                     <% end %>          
                  </div>
            </div>       
        <% end %>

Gear Model

class Gear < ActiveRecord::Base
  ...
  ajaxful_rateable :stars => 6, :allow_update => true
end

User Model

class User < ActiveRecord::Base 
 ...
  ajaxful_rater
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-10T16:27:37+00:00Added an answer on June 10, 2026 at 4:27 pm

    You are missing a table in your database (probably required by the gem). Are you sure you have migrated your database?

    You must run the script which probably generates migrations, but then you must also:

    rake db:migrate
    

    or bundle exec rake db:migrate if required.


    Make sure that you have run the generate script (from the README):

    script/generate ajaxful_rating UserModelName
    

    The generator takes one argument: UserModelName, which is the name of
    your current user model. This is necessary to link both the rate and
    user models.

    Also this generator copies the necesary images, styles, etc.

    Example: I suppose you have generated already an authenticated model…

    script/generate authenticated user sessions
    script/generate ajaxful_rating user
    

    So this call will create a Rate model and will link it to your User
    model.

    This section in the README definitely implies a migration is generated.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.