0

似乎不适合我。我会在 Github 上打开一个问题,但我想仔细检查一下我没有先做一些愚蠢的事情。使用 Rails 3.2.8 和 Ruby 1.9.3。这是API参考

» bundle exec rails c
Loading development environment (Rails 3.2.8)
1.9.3-p194 :001 > helper.distance_of_time_in_words_to_now("2012-10-18")
ArgumentError: wrong number of arguments (2 for 1)
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/letters-0.2.6/lib/letters/core_ext.rb:155:in `t'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_view/helpers/date_helper.rb:93:in `block in distance_of_time_in_words'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/core_ext/object/with_options.rb:41:in `with_options'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_view/helpers/date_helper.rb:73:in `distance_of_time_in_words'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_view/helpers/date_helper.rb:133:in `time_ago_in_words'
    from (irb):1
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
    from /Users/davidtuite/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
4

1 回答 1

0

lettersgem与帮助程序中使用的Railst方法冲突distance_of_time_in_words

有关详细信息,请参阅Letters 网站上的说明。

于 2012-10-15T11:23:19.630 回答