Unknown encoding in ruby 1.9.1-p429

Update to new patchlevel = new errors
Added by Christoph Kappel over 6 years ago

Updating Ruby is usually a task that breaks many things, therefore I avoid it if possible. Being archuser, the maintainer of the Ruby decides when I need to face new problems.

This time they just added filesystem encoding stuff in p429:

Error loading gem paths on load path in gem_prelude
unknown encoding name - filesystem
<internal:gem_prelude>:69:in `find'
<internal:gem_prelude>:69:in `set_home'
<internal:gem_prelude>:38:in `dir'
<internal:gem_prelude>:76:in `set_paths'
<internal:gem_prelude>:47:in `path'
<internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
<internal:gem_prelude>:355:in `<compiled>'

There exists still now sane way to init the gem path of Ruby so we can start with our hack from Setup gems load path in embedded ruby and add the required encoding stuff. This problem is known in the ruby redmine and the changesets to this issue give at least some hints what need to be done:

Numbers: on /off 1 #include <ruby/encoding.h>
 2 
 3 VALUE encoding = Qnil;
 4 
 5 void Init_prelude(void);
 6 
 7 RUBY_INIT_STACK;
 8 ruby_init();
 9 ruby_init_loadpath();
10 ruby_script("subtle");
11 
12 /* Get encoding from file system */
13 encoding = rb_enc_from_encoding(rb_filesystem_encoding());
14 
15 /* Set internal and external encoding */
16 rb_enc_set_default_internal(encoding);
17 rb_enc_set_default_external(encoding);
18 
19 /* FIXME: Fake ruby_init_gems(Qtrue) */
20 rb_define_module("Gem");
21 Init_prelude();

Comments

Added by jan harshal almost 5 years ago

Well said. I never thought I would agree with this opinion, but I’m starting to view things from a different view. I have to research more on this as it seems very interesting. next top fashions

Added by jan harshal almost 5 years ago

Rale galvanising penalization. Transactions has been handwritten in hit overnice enounce. I tap accruement this palatalised of becalm. Thanks for coitus gaolbreak noesis. top real fashions

Added by arog nasir almost 5 years ago

I bumped into your post. I don't usually post in blogs but your blog forced me to. Awesome work! Thank you for sharing! business information

Added by arog nasir almost 5 years ago

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. info for dedicated servers