# Question about "No such file to load -- rexml/encodings/ISO-

**URL:** <https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559>\
**Category:** Ruby\
**Created:** [August 9, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559 "2006-08-09T23:23:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 9, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/1 "2006-08-09T23:23:33Z")

</div>

Hi all,

I am new to Ruby, so forgave me if this question has been asked before.  
I am running a software on Windows XP which is written in Ruby . The  
script has been converted to exe. I kept getting the following error  
message when I run it.

No such file to load – rexml/encodinigs/ISO-8859-1.rb  
C:\DOCUME~1/username/LOCALS~1/Temp/eee..2/lib/rexml/encoding.rb:33:in encodinig=’: No decoder found for  
encoding ISO-8859-1. Please install iconv.

I know that ISO-8859-1 is the encoder for Latin characters. I checked  
the path shown in the error message and there is nothing Ruby there. I  
installed Ruby in my computer after that and I do have the file  
ISO-8859-1.rb under Ruby directory now. But I am still getting the same  
message. So I am not sure if this problem comes up because I am using  
Windows. Can I specify the library for the executable to link some how?

Thanks in advance.

Yaoyao

---

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 9, 2006, 11:44pm UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/2 "2006-08-09T23:44:36Z")

</div>

On 8/9/06, Yaoyao Gu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> encoding ISO-8859-1. Please install iconv.  
> Yaoyao  
> Hi,

your script has been converted to exe with rubyscript2exe  
([http://www.erikveen.dds.nl/rubyscript2exe/index.html](http://www.erikveen.dds.nl/rubyscript2exe/index.html)) so maybe there  
you can find some advice.

First, try adding path to the ISO…rb to %RUBYOPTS%:

set RUBYOPTS=%RUBYOPTS% -Ipath/to/iso88591.rb

and hope that the packed script will pick it up 😉

If not, I would recommend extracting the archive (your.exe  
–eee-justextract) and checking if the file is there. If not, you can  
try to provide one (e.g. from your regular ruby installation, and make  
sure that is as much similar version as possible) and repack.

I don’t remember the exact process of repacking, I was something like

1. edit .eee file found in the unpacked dir (add reference to iso8859  
file),
2. call eee.exe \<the .eee file\> \<destination.exe\>

Or, you can try running the script with your ‘regular’ ruby  
installation.

Good luck!

Jano

---

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 9, 2006, 11:44pm UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/3 "2006-08-09T23:44:36Z")

</div>

Fix:  
On 8/9/06, Jan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 8/9/06, Yaoyao Gu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
> First, try adding path to the ISO…rb to %RUBYOPTS%:
> 
> set RUBYOPTS=%RUBYOPTS% -Ipath/to/iso88591.rb

set RUBYOPTS=%RUBYOPTS% -Ipath/to/lib dir

i.e. set RUBYOPTS=%RUBYOPTS% -Ic:/ruby/lib/1.8

Jano

---

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 10, 2006, 1:50am UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/4 "2006-08-10T01:50:41Z")

</div>

Hi Jano,

I have tried unpack the exe file, then add the reference of ICONV.rb and  
ISO-8859-1.rb to the app.eee file. Then I repack the file and run it. I  
still have the same error as before. I attached the following code that  
generates this exception. Any hints?

begin  
load ‘rexml/encodings/ICONV.rb’  
instance\_eval @@\_\_REXML\_encoding\_methods  
Iconv::iconv( UTF\_8, @encoding, “” )  
rescue LoadError, Exception =\> err  
raise “Bad encoding name #@encoding” unless @encoding =~  
/^[\w-]+$/  
@encoding.untaint  
enc\_file = File.join( “rexml”, “encodings”, “#@encoding.rb” )  
begin  
load enc\_file  
instance\_eval @@\_\_REXML\_encoding\_methods  
rescue LoadError  
puts $!.message  
raise Exception.new( “No decoder found for encoding #@encoding.  
Please install iconv.” )  
end  
end

---

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 15, 2006, 2:12pm UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/5 "2006-08-15T14:12:18Z")

</div>

> No such file to load – rexml/encodinigs/ISO-8859-1.rb  
> C:\DOCUME~1/username/LOCALS~1/Temp/eee. .2/lib/rexml/encoding.rb:33:in encodinig=':  
> No decoder found for encoding ISO-8859-1.  
> Please install iconv.  
> You might want to try to load the correct encoding explicitly:

require “rubyscript2exe.rb”  
load “rexml/encodings/ISO-8895-1.rb” if RUBYSCRIPT2EXE.is\_compiling?

Can you post the smallest test script in which the problem  
still occurs?

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)

---

<div class="post-metadata">

**Author:** ![Yaoyao\_Gu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a87d85/32.png) [@Yaoyao\_Gu](https://www.ruby-forum.com/u/Yaoyao_Gu)\
**Post date:** [August 10, 2006, 12:26am UTC](https://www.ruby-forum.com/t/question-about-no-such-file-to-load-rexml-encodings-iso/64559/6 "2006-08-10T00:26:38Z")

</div>

Thanks for the quick reply! Well, this didn’t solve my problem. I guess  
I need to run the project from source. I will try that!

Yaoyao
