GetText tasks break rails doc:app task

10 views
Skip to first unread message

Sava Chankov

unread,
Sep 11, 2006, 1:12:53 PM9/11/06
to rubyonra...@groups.google.com
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

Michael Genereux

unread,
Sep 11, 2006, 3:39:30 PM9/11/06
to rubyonra...@googlegroups.com
What platform is this on?

Masao Mutoh

unread,
Sep 11, 2006, 7:16:26 PM9/11/06
to rubyonra...@googlegroups.com
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.


--
--
.:% Masao Mutoh<mu...@highway.ne.jp>

Sava Chankov

unread,
Sep 13, 2006, 5:55:50 AM9/13/06
to rubyonra...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages