cedlemo
cedlemo

Reputation: 3334

rake and utf-8 char in appication path

I use an application which I compile using rake. The problem is if I set my application directory in a path containing non US-ASCII char, the compilation fails.

For exemple:

cd /home/user/Downloads/my_app
rake 

==> it works

cd /home/user/Téléchargements/my_app
rake

==> it doesn't work

My system is full utf-8

How can I avoid this?

For information the application that I try to compile is subtle :

hg clone http://hg.subforge.org/subtle
cd subtle
rake

Here the full error message:

** Invoke default (first_time)
** Invoke config (first_time)
** Execute config
checking for stdio.h... yes
checking for stdlib.h... yes
checking for stdarg.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for signal.h... yes
checking for errno.h... yes
checking for assert.h... yes
checking for sys/time.h... yes
checking for sys/types.h... yes
checking for sys/inotify.h... yes
checking for wordexp.h... yes
rake aborted!
invalid byte sequence in US-ASCII
/usr/lib/ruby/1.9.1/mkmf.rb:785:in `[]'
/usr/lib/ruby/1.9.1/mkmf.rb:785:in `checking_for'
/home/silkmoth/Téléchargements/subtle/Rakefile:335:in `block in <top (required)>'
/usr/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/usr/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/usr/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/usr/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/usr/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/1.9.1/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/lib/ruby/1.9.1/rake/task.rb:174:in `each'
/usr/lib/ruby/1.9.1/rake/task.rb:174:in `invoke_prerequisites'
/usr/lib/ruby/1.9.1/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/usr/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/usr/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/usr/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/usr/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/1.9.1/rake/application.rb:63:in `run'
/usr/bin/rake:32:in `<main>'
Tasks: TOP => default => config

Upvotes: 2

Views: 552

Answers (1)

unexist
unexist

Reputation: 2528

The problem is not the encoding of the files, but the non-ascii symbols in your path ('Téléchargements').

Apparently, the exception happens in #checking_for from mkmf on line 785 in combination with rake. As author of the Rakefile, there is nothing I can do about that, besides reporting that upstream and/or find a way to avoid the method at all.

Quick fix is use a path without non-ascii symbols, sorry.

Upvotes: 1

Related Questions