[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Question about "No such file to load -- rexml/encodings/ISO-8859-1.rb"

Yaoyao Gu

8/9/2006 9:23:00 PM

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.<executable
name>.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


4 Answers

Jano Svitok

8/9/2006 9:44:00 PM

0

Fix:
On 8/9/06, Jan Svitok <jan.svitok@gmail.com> wrote:
> On 8/9/06, Yaoyao Gu <guy@ece.osu.edu> 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

Yaoyao Gu

8/9/2006 10:25:00 PM

0

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

On Aug 09, 2006 05:44 PM, Jan Svitok <jan.svitok@gmail.com> wrote:

> Fix:
> On 8/9/06, Jan Svitok <jan.svitok@gmail.com> wrote:
> > On 8/9/06, Yaoyao Gu <guy@ece.osu.edu> 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
>


Yaoyao Gu

8/9/2006 11:48:00 PM

0

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

On Aug 09, 2006 05:44 PM, Jan Svitok <jan.svitok@gmail.com> wrote:

> Fix:
> On 8/9/06, Jan Svitok <jan.svitok@gmail.com> wrote:
> > On 8/9/06, Yaoyao Gu <guy@ece.osu.edu> 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
>


Erik Veenstra

8/10/2006 8:40:00 AM

0

> No such file to load -- rexml/encodinigs/ISO-8859-1.rb
> C:\DOCUME~1/username/LOCALS~1/Temp/eee.<executable name> .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.erikve...