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! -- Carlos --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, On Tue, 9 Jan 2007 13:00:35 +0100 "Carlos Paramio" <carlosparamio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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:<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. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
It worked! Thank you! On 1/9/07, Masao Mutoh <mutoh-+e5RZkbjevhHfZP73Gtkiw@public.gmane.org> wrote:> > Hi, > > On Tue, 9 Jan 2007 13:00:35 +0100 > "Carlos Paramio" <carlosparamio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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: > <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. > > > >-- Carlos Alberto Paramio Danta .--. http://www.sinfoniadebits.com/ |o_o | email & jabber: carlosparamio @ gmail.com |:_/ | Web Development & Solutions - Learning // \ \ ----------------------------------------( | | )-- Fingerprint 41C6 D2BE 7DE7 AB61 C23F /''\_ _/`\ F697 5A1D 1849 01B8 D318 \___)=(___/ --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---