wycats/thor — Issue #184: thor errors on accented letter in folder name with ruby 1.9.3rc1 and head
Author: nortcele
Created: 2011-10-18 08:53:53+00:00
State: open

On OS X Lion 10.7.2
With ruby 1.9.3-RC1 and ruby 1.9.3-head

Thor fails when a folder with an accented letter is in the path.

rvm install 1.9.3-head
rvm --create 1.9.3-head@rails3.1.1
rvm --default use 1.9.3-head@rails3.1.1
gem install rails
cd Documents/EMC/Émilie/rails/
rails new test_app

fails with error

/Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions.rb:117:in `gsub': invalid multibyte character: /\/Users\/billgates\/Documents\/EMC\/E\xCC\x81milie\/rails\/test_app/ (RegexpError)
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions.rb:117:in `relative_to_original_destination_root'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:87:in `destination='
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:37:in `initialize'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:15:in `new'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:15:in `empty_directory'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/railties-3.1.1/lib/rails/generators/app_base.rb:103:in `create_root'
from (eval):1:in `create_root'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/railties-3.1.1/lib/rails/commands/application.rb:31:in `'
from /Users/billgates/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/billgates/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/railties-3.1.1/lib/rails/cli.rb:15:in `'
from /Users/billgates/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/billgates/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/gems/rails-3.1.1/bin/rails:7:in `'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/bin/rails:19:in `load'
from /Users/billgates/.rvm/gems/ruby-1.9.3-head@rails3.1.1/bin/rails:19:in `

'

There is no such problem with:
- ruby 1.9.2 - ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0],
- Apple's system ruby ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]

Yours