Rails + Gettext problem

Hello,
I had to format my pc, and now i can´t get Rails + Gettext to work...
Any ideas?
Tnx for the help,
Guilherme

NameError

uninitialized constant System

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:123:in `const_missing'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale_win32.rb:17
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale.rb:38
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext.rb:19
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
cgi.rb:13
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
rails.rb:12
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
#{RAILS_ROOT}/app/controllers/application.rb:5
-e:4:in `load'
-e:4

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:123:in `const_missing'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale_win32.rb:17
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale.rb:38
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext.rb:19
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
cgi.rb:13
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
rails.rb:12
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:56:in `rails_pre_engines_require_or_load'
#{RAILS_ROOT}/vendor/plugins/engines/lib/engines/
dependencies_extensions.rb:60:in `rails_1_1_require_or_load'
#{RAILS_ROOT}/vendor/plugins/engines/lib/engines/
dependencies_extensions.rb:14:in `require_or_load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:30:in `depend_on'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:85:in `require_dependency'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:69:in
`prepare_application'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:37:in
`dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:
115:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:81:in
`service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:67:in
`dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/servers/
webrick.rb:59
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:30
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
script/server:3

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:123:in `const_missing'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale_win32.rb:17
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
locale.rb:38
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext.rb:19
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
cgi.rb:13
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.8.0-mswin32/lib/gettext/
rails.rb:12
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
#{RAILS_ROOT}/app/controllers/application.rb:5
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:56:in `rails_pre_engines_require_or_load'
#{RAILS_ROOT}/vendor/plugins/engines/lib/engines/
dependencies_extensions.rb:60:in `rails_1_1_require_or_load'
#{RAILS_ROOT}/vendor/plugins/engines/lib/engines/
dependencies_extensions.rb:14:in `require_or_load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:30:in `depend_on'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:85:in `require_dependency'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:69:in
`prepare_application'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:37:in
`dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:
115:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:81:in
`service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:67:in
`dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/servers/
webrick.rb:59
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:30
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/
dependencies.rb:147:in `require'
script/server:3
-e:4:in `load'
-e:4

This error occured while loading the following files:
   application.rb
   gettext/rails
   gettext/cgi
   gettext
   gettext/locale
   gettext/locale_win32
   locale/system.rb

Hi,

Did you install gettext gem of win32 version?

Hi,

  I work with Guilherme. Yes, we did install gettext gem for win32
(1.8.0). We have it for granted that is an installation issue cus the
very same code works in my computer but not in his. Any tip else?

  Thank you
  Ricardo

Hi,

Hi Massao,

  We've made some new tests and realized that this error message
(uninitialized constant System) occurs even when GNU GetText is not
installed. The System variable MSGMERGE_PATH is correctly setted.
  We've tried to reinstall gnu gettext, reinstall gettext gems with no
results. Furthermore we tried to locate another installation of
gettext and did not get any results.
  I think that in application.rb when we try to require the gettext
gem (require 'gettext/rails') it do not locate gnu gettext.

Hope you can point us to solve this issue.
Thank you for your help.

I've done some further tests and seems to me that since gettext1.8 it
is not necessary to have gnu gettext installed. Massao, is that
correct?

Ricardo

Hi,

Hi Massao,

  We've made some new tests and realized that this error message
(uninitialized constant System) occurs even when GNU GetText is not
installed. The System variable MSGMERGE_PATH is correctly setted.
  We've tried to reinstall gnu gettext, reinstall gettext gems with no
results. Furthermore we tried to locate another installation of
gettext and did not get any results.
  I think that in application.rb when we try to require the gettext
gem (require 'gettext/rails') it do not locate gnu gettext.

Ruby-GetText doesn't use GNU Gettext on runtime.
(It is used when you execute "rake updatepo" only)

You said "reinstall gettext gems".... I think you have OTHER versions of
Ruby-GetText which don't depend on rubygems.
Did you check it?

Anyway, it may be better to uninstall and remove all of ruby files(c:\ruby)
then reinstall ruby and gems.

HTH,

Hello Masao,

We finally found the solution. There was some problem with
msvcr71.dll.
It was in Aptana's folder... We moved it to system32 and now it works
fine.

Thanks a lot for your help. Have a nice day :slight_smile: