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:inrequire’
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:inrequire’
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:inrequire_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:inrun’
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!

Carlos

Hi,

On Tue, 9 Jan 2007 13:00:35 +0100
“Carlos P.” [email protected] wrote:

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:

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!

On 1/9/07, Masao M. [email protected] wrote:

class Post < ActiveRecord::Base


Carlos Alberto Paramio Danta .–.
http://www.sinfoniadebits.com/ |o_o |
email & jabber: carlosparamio @ gmail.com |:_/ |
Web D. & Solutions - Learning // \
----------------------------------------( | | )–
Fingerprint 41C6 D2BE 7DE7 AB61 C23F /’_ /`
F697 5A1D 1849 01B8 D318 _)=(
/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs