I''m using Ruby-GetText-Package 1.7.0 and created tasks as in tutorial (http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Rakefile ) However, require ''gettext/utils'' breaks rails doc:app task - the latter gives rake aborted! uninitialized constant RubyToken::AlreadyDefinedToken /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1948:in `const_missing'' /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:274:in `def_token'' /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:301 /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:300 /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /opt/local/lib/ruby/1.8/rdoc/rdoc.rb:8 /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rdoctask.rb:112:in `define'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'' /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /opt/local/bin/rake:18 -- Sava Chankov --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
What platform is this on? On 9/11/06, Sava Chankov <sava.chankov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m using Ruby-GetText-Package 1.7.0 and created tasks as in tutorial > (http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Rakefile ) > However, require ''gettext/utils'' breaks rails doc:app task - the latter gives > > rake aborted! > uninitialized constant RubyToken::AlreadyDefinedToken > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1948:in `const_missing'' > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:274:in `def_token'' > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:301 > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:300 > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' > /opt/local/lib/ruby/1.8/rdoc/rdoc.rb:8 > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rdoctask.rb:112:in `define'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' > /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in > `invoke_prerequisites'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in > `invoke_prerequisites'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'' > /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 > /opt/local/bin/rake:18 > > -- > Sava Chankov > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hi, Does this solve your problem? desc "Update pot/po files." task :updatepo do require ''gettext/utils'' #Here! GetText.update_pofiles("blog", Dir.glob("{app,lib,bin}/**/*.{rb,rhtml}"), "blog 1.0.0") end desc "Create mo-files" task :makemo do require ''gettext/utils'' #Here! GetText.create_mofiles(true, "po", "locale") end That point is "require ''gettext/utils''" is set in each tasks. On Mon, 11 Sep 2006 20:12:53 +0300 Sava Chankov <sava.chankov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m using Ruby-GetText-Package 1.7.0 and created tasks as in tutorial > (http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html#Rakefile ) > However, require ''gettext/utils'' breaks rails doc:app task - the latter gives > > rake aborted! > uninitialized constant RubyToken::AlreadyDefinedToken > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1948:in `const_missing'' > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:274:in `def_token'' > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:301 > /opt/local/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:300 > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' > /opt/local/lib/ruby/1.8/rdoc/rdoc.rb:8 > /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rdoctask.rb:112:in `define'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' > /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in > `invoke_prerequisites'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in > `invoke_prerequisites'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'' > /opt/local/lib/ruby/1.8/thread.rb:135:in `synchronize'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > /opt/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 > /opt/local/bin/rake:18 > > -- > Sava Chankov > > > >-- -- .:% Masao Mutoh<mutoh-+e5RZkbjevhHfZP73Gtkiw@public.gmane.org> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Masao Mutoh wrote:> Hi, > > Does this solve your problem? > > desc "Update pot/po files." > task :updatepo do > require ''gettext/utils'' #Here! > GetText.update_pofiles("blog", Dir.glob("{app,lib,bin}/**/*.{rb,rhtml}"), "blog 1.0.0") > end > > desc "Create mo-files" > task :makemo do > require ''gettext/utils'' #Here! > GetText.create_mofiles(true, "po", "locale") > end > > That point is "require ''gettext/utils''" is set in each tasks.Yes, that does the job. Thanks! -- Sava Chankov --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---