time_ago_in_words => “in {{count}} days.”?

前端 未结 4 1019
青春惊慌失措
青春惊慌失措 2021-02-20 12:13

I\'m having a very weird bug. In my code I have <%= time_ago_in_words(game.created_at) %>

It\'s works locally and on my staging server but NOT on my p

4条回答
  •  梦毁少年i
    2021-02-20 12:56

    Rails was using some deprecated syntax in the helper which then got dropped in the latest Ruby version. If you are using something like Heroku, try telling your production instance to use Rails 2.3.9. Otherwise you can also try downgrading Ruby.

    See the changelog: http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released

    Changes i18n named-interpolation syntax from the deprecated Hello {{name}} to the 1.9-native Hello %{name}.

    This looks like it will fix your problem.

提交回复
热议问题