# Problems using Gettext 1.90.0 update\_pofiles

**URL:** <https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986>\
**Category:** Rails I18n\
**Created:** [April 27, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986 "2008-04-27T17:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaughanjackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/58956e/32.png) [@vaughanjackson](https://www.ruby-forum.com/u/vaughanjackson)\
**Post date:** [April 27, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986/1 "2008-04-27T17:00:51Z")

</div>

Hi,

I’m a newbie to Ruby and Rails. I am following Sascha E.'s tutorial  
on Gettext at [Peak Obsession](http://manuals.rubyonrails.com/read/chapter/105#page298).  
This tutorial describes a step in which update\_pofiles is used to  
generate the .pot and .po files from .rb and .rhtml files containing  
gettext calls. However, when I try to use this from rake, it only seems  
to partially succeed. I see this error:

C:\Users\Vaughan\Ruby\test\_app\>rake updatepo --trace  
(in C:/Users/Vaughan/Ruby/test\_app)  
\*\* Invoke updatepo (first\_time)  
\*\* Execute updatepo  
po/testapp.pot  
rake aborted!  
No such file or directory - msgmerge po/testapp.pot tmp.pot  
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:51:in  
``’  
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:51:in  
`msgmer ge' c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:74:in `msgmer  
ge\_all’  
c:/ruby/lib/ruby/gems/1.8/gems/gettext-1.90.0/lib/gettext/utils.rb:123:in  
`updat e_pofiles' C:/Users/Vaughan/Ruby/test_app/lib/tasks/updatepo.rake:14 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke\_with\_call\_c  
hain’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in  
`synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke\_with\_call\_c  
hain’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke\_task’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard\_exceptio  
n\_handling’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in  
`top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in  
`standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run’  
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31  
c:/ruby/bin/rake:19:in `load’  
c:/ruby/bin/rake:19

This produced a testapp.pot file, but no .po files in the relevant  
subdirectories.  
The content of the testapp.pot included:

#: app/controllers/application.rb:6  
msgid “blah”  
msgstr “”

I tried changing utils.rb to call rmsgmerge instead of msgmerge, but  
this seemed to make things worse, as I ended up with a testapp.pot only  
with no msgid/msgstr pairs in it (the error message disappears).

What am I doing wrong?

Thanks,  
Vaughan.

---

<div class="post-metadata">

**Author:** ![vaughanjackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/58956e/32.png) [@vaughanjackson](https://www.ruby-forum.com/u/vaughanjackson)\
**Post date:** [April 29, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986/2 "2008-04-29T19:49:58Z")

</div>

Make the language-specific subdirectories in /po by hand, then copy the  
.pot file in to each of the folders, renaming it to .po in the process.  
Now, running updatepo will update the template as well as the .po files  
automatically. This is how I’ve always done it, as I don’t believe that  
the rake task creates the directories and copies the files for you.

Hope this helps,  
Max

---

<div class="post-metadata">

**Author:** ![vaughanjackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/58956e/32.png) [@vaughanjackson](https://www.ruby-forum.com/u/vaughanjackson)\
**Post date:** [May 1, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986/3 "2008-05-01T19:57:05Z")

</div>

Hi Maxï¼Œ

Yes, that’s it! I just need to ignore the error messages  
generated by the rake updatepo step and create the .po  
files by hand as you say.

Thanks for your help,  
Vaughan.
