0

我建設目前正使用的i18n-tasks寶石一個新的Rails應用程序,但是當我運行命令i18n-tasks顯示輸出:Rails 3上的i18n-tasks命令錯誤?

/home/user-pc/.rvm/gems/[email protected]/gems/i18n-tasks-0.5.1/lib/i18n/tasks/plural_keys.rb:3:in `<module:PluralKeys>': uninitialized constant I18n::Tasks::PluralKeys::Set (NameError) 
    from /home/user-pc/.rvm/gems/[email protected]/gems/i18n-tasks-0.5.1/lib/i18n/tasks/plural_keys.rb:2:in `<top (required)>' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/gems/[email protected]/gems/i18n-tasks-0.5.1/lib/i18n/tasks/base_task.rb:5:in `<top (required)>' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/gems/[email protected]/gems/i18n-tasks-0.5.1/lib/i18n/tasks.rb:20:in `<top (required)>' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require' 
    from /home/user-pc/.rvm/gems/[email protected]/gems/i18n-tasks-0.5.1/bin/i18n-tasks:4:in `<top (required)>' 
    from /home/user-pc/.rvm/gems/[email protected]/bin/i18n-tasks:23:in `load' 
    from /home/user-pc/.rvm/gems/[email protected]/bin/i18n-tasks:23:in `<main>' 

有什麼主要問題?爲什麼我不能像README文件那樣運行這些命令?

回答

1

主要問題是如何運行i18n-tasks命令。該Readme文件說,我可以執行:

i18n-tasks 

但是,直接執行的命令失敗了我。要正常工作,命令需要運行如下:

bundle exec i18n-tasks 

這就是全部。