I have a problem running a Ruby on Rails application using Passenger. My application resides in the /Users/Glutexo/Práce/Bytek/Bytek directory, which you can see has a non-ASCII character in in (á). Even when I symlink it into another directory, e.g. /Library/WebServer/Documents/Bytek with all characters being US-ASCII, the problem is still there.
But when I create another Rails application physically in all US-ASCII path, like /Users/Glutexo/rails/pokus, it works: The application starts and runs normally through Passenger.
The error page I get when trying to run a Rails application residing in non-ASCII path says the following:
Error message:
invalid byte sequence in US-ASCII
Exception class:
ArgumentError
Backtrace:
0 | /Users/Glutexo/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/pathname.rb | 45 | in `=~'
The line in pathname.rb mentioned is in the following function:
# chop_basename(path) -> [pre-basename, basename] or nil
def chop_basename(path)
base = File.basename(path)
if /\A#{SEPARATOR_PAT}?\z/o =~ base # This is the line no. 45
return nil
else
return path[0, path.rindex(base)], base
end
end
private :chop_basename
Does anyone have any suggestion, how to convince Passenger to be able to run Ruby on Rails application even from a path containing non-ASCII characters?
Rails is version 3.2.2, Ruby is version 1.9.3-p125, Apache is version 2.2.21, Passenger is version 3.0.12.
Thanks in advance for any help!