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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:32:19+00:00 2026-06-15T07:32:19+00:00

I’m having trouble to deploy my rails application to Heroku. I did it just

  • 0

I’m having trouble to deploy my rails application to Heroku.
I did it just as normally, but this time I got these errors on the console.

I wonder how they can appear, because I don’t even have gsub! used in here.

In my normal production environment it worked just fine, so what did I forget to think about in this case?

Thanks for your help!

The Error prompts: (by the way, the database content isn’t nil or something like that)

Started GET "/tournaments" for XXX at 2012-11-29 17:14:18 +0000
Processing by TournamentsController#index as HTML
  Rendered tournaments/index.html.erb within layouts/application (74.9ms)
Completed 500 Internal Server Error in 193ms

    31:     <td><%= raw tournament.address.split(", ").join("<br />") %></td>
    33:     <td><%= DateTime.parse(tournament.date).strftime("%H:%M") %></td>
ActionView::Template::Error (undefined method `gsub!' for 2012-12-08 15:00:00 UTC:Time):
    30:     <td><%= tournament.place %> von <%= tournament.participants %></td>
    35:     <td><%= link_to 'Show', tournament %></td>
  app/views/tournaments/index.html.erb:32:in `block in _app_views_tournaments_index_html_erb___1016767371206226983_23066580'
  app/views/tournaments/index.html.erb:26:in `each'
  app/views/tournaments/index.html.erb:26:in `_app_views_tournaments_index_html_erb___1016767371206226983_23066580'
    29:     <td><%= tournament.user.name %></td>

  app/controllers/tournaments_controller.rb:11:in `index'
    32:     <td><%= DateTime.parse(tournament.date).strftime("%d.%m.%Y") %></td>
    34:     <td><%= tournament.kind %></td>
  • 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-15T07:32:21+00:00Added an answer on June 15, 2026 at 7:32 am

    It looks like the object returned by tournament.date is of type Time, where as DateTime.parse expects a string. The underlying implementation of the parse method does a gsub! on the argument passed. Hence the error.

    You have two solutions :

    1. If you always get a Time object from tournament.date then you can use tournament.date.to_datetime (Although I don’t think you actually need a DateTime object. You can use the Time object for the strftime)

    2. If you aren’t guaranteed a Time object then pass the stringified object to parse like this DateTime.parse(tournament.date.to_s)

    P.S : I do not know how this code worked for you on your local machine. Could be because of different ruby versions in the two setups. My answer is based on MRI 1.9.2.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
This could be a duplicate question, but I have no idea what search terms
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
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,

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.