Gettext and Rails Edge

Hi!

I'm trying to use gettext in an application that uses Rails Edge (because the REST api). But I can't get it to work at all.

I'm using Gettext 1.8.0 gem and Rails revision 5875.

This is what a traceback outputs when trying to generate a po file for a model:

$ rgettext app/models/post.rb

<HERE_COMES_PO_HEADER> Error occurs in app/models/post.rb /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing': uninitialized constant Deprecated (NameError)         from ./config/../vendor/rails/actionpack/lib/action_controller/base.rb:212         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'         from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'         from ./config/../vendor/rails/actionpack/lib/action_controller.rb:37         from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'         from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'         from ./config/../vendor/rails/railties/lib/initializer.rb:162:in `require_frameworks'         from ./config/../vendor/rails/railties/lib/initializer.rb:162:in `require_frameworks'          ... 11 levels...         from /opt/local/lib/ruby/gems/1.8/gems/gettext-1.8.0/lib/gettext/rgettext.rb:206:in `run'         from /opt/local/lib/ruby/gems/1.8/gems/gettext-1.8.0/lib/gettext/rgettext.rb:226:in `rgettext'         from /opt/local/lib/ruby/gems/1.8/gems/gettext-1.8.0/bin/rgettext:24         from /opt/local/bin/rgettext:18

But if I try to generate the po file for a controller or a view all works perfectly. Because of the model extraction error, I can't use gettext tasks to extract all the strings on the application.

My post model is very simple:

class Post < ActiveRecord::Base end

Do you know with which Rails Edge revision will it work, or how to fix current gettext plugin?

Thanks!

Hi,

Hi!

I'm trying to use gettext in an application that uses Rails Edge (because the REST api). But I can't get it to work at all.

I'm using Gettext 1.8.0 gem and Rails revision 5875.

This is what a traceback outputs when trying to generate a po file for a model:

<snip>

But if I try to generate the po file for a controller or a view all works perfectly. Because of the model extraction error, I can't use gettext tasks to extract all the strings on the application.

My post model is very simple:

class Post < ActiveRecord::Base end

Do you know with which Rails Edge revision will it work, or how to fix current gettext plugin?

Do you try CVS version of Ruby-GetText ? If you use Rails Edge, you need to use CVS version of GetText.

BTW, Ruby-GetText-Package is not a plugin of Ruby on Rails. You can use it for any ruby scripts.

It worked!

Thank you!