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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:03:08+00:00 2026-05-28T06:03:08+00:00

When I run this line of code in my view, <%= image_tag(item.picture.url(:medium), :class =>

  • 0

When I run this line of code in my view,

<%= image_tag(item.picture.url(:medium), :class => "iteminfo") %>

I get a

 undefined method `symbolize_keys'

error. I’m currently using the paperclip gem with S3 storage. Any suggestions?

— Edit:

Here is what the server log says:

Started GET "/items/compare" for 127.0.0.1 at 2012-01-19 14:47:21 -0500
Processing by ItemsController#compare as HTML
(0.1ms)  SELECT items.id FROM "items" 
Item Load (0.2ms)  SELECT "items".* FROM "items" WHERE "items"."id" IN (3, 2)
Rendered items/compare.html.erb within layouts/application (37.3ms)
Completed 500 Internal Server Error in 99ms

ActionView::Template::Error (undefined method `symbolize_keys' for #<String:0x007f9ebccd92b0>):
3: <% @items.each do |item| %>
4:  <div class="item<%= loopcount %>">
5:      <% loopcount = loopcount +1%>
6:      <%= image_tag(item.picture.url(:medium), :class => "iteminfo") %> <blockquote>     </blockquote>
7:      <h2 class = "iteminfotext"><%= item.votes %></h2>
8:      <h1 class = "iteminfotext"><%= item.location %></h1>
9:      <div class="iteminfotext"><%= button_to "Vote", :action => "vote", :id => item.id, %></div>
app/views/items/compare.html.erb:6:in `block in _   app_views_items_compare_html_erb___818922328118740053_70159882605160'
app/views/items/compare.html.erb:3:in `each'
app/views/items/compare.html.erb:3:in `  _app_views_items_compare_html_erb___818922328118740053_70159882605160'

Rendered /Users/Alex/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-  3.1.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.1ms)
Rendered /Users/Alex/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /Users/Alex/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (3.8ms)
  • 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-28T06:03:09+00:00Added an answer on May 28, 2026 at 6:03 am

    This is kind of a rails or paperclip issue. If you do

    <%= image_tag(item.picture.url(:medium), :class => "iteminfo") %>
    

    it would not work unless you change it to a link like

    <%= link_to image_tag(item.picture.url(:medium), :class => "iteminfo"), item_path(item) %>
    

    else you would always be getting the

    undefined method `symbolize_keys'
    

    to avoid this, all you have to do is reconstruct your image tag block to look like this

     <%= image_tag(item.picture.url(:medium)), :class => "iteminfo" %>
    

    or

    <%= image_tag(item.picture(:medium)), :class => "iteminfo" %>
    

    then your problem is solved

    update:

    <%= image_tag item.picture.url(:medium), :class => "iteminfo" %>
    <%= image_tag item.picture(:medium), :class => "iteminfo" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this line of code: this.Path = pathLookUpLocation.GetValue(RegLookupKey, null).ToString(); When I run static
I run this piece of code on Visual C++ 2010 char c[10]; cin.get(&c[0],5); cin.get(&c[2],4);
If I run this code as it is, I see a line from the
i have this line of code in my view using the Telerik Grid: columns.Bound(o
I get this error when I run my code. This is a continuation from
i get an Inflate Exception, android.view.InflateException: Binary XML file line #76: Error inflating class
I need to run this line from my c++ program: java -jar test.jar text1
When I run this line: plot(z$prod,z$x, type=l) It plots the values as dashes and
I have a custom SQL query that I run with this line: @avg_score =
How can I run this on linux command line when my username has an

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.