New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RubyGems not working on command line cshoes #71

Closed
BackOrder opened this Issue Feb 19, 2015 · 15 comments

Comments

Projects
None yet
3 participants
@BackOrder
Collaborator

BackOrder commented Feb 19, 2015

RubyGems will not work properly on command line for non-English Windows systems due to the different codepage than an English Windows system (chcp 1252). The test scenario below shows that U+2019, which is in Unicode, is raising the exception.

TEST SCENARIO

C:\Program Files (x86)\Shoes>chcp
Page de codes active : 437

C:\Program Files (x86)\Shoes>cshoes -g outdated
ERROR:  While executing gem ... (Encoding::UndefinedConversionError)
    U+2019 to IBM437 in conversion from UTF-16LE to UTF-8 to IBM437
Exiting RubyGems with exit_code 1

WORKAROUND

C:\Program Files (x86)\Shoes>chcp 1252
Page de codes active : 1252

C:\Program Files (x86)\Shoes>cshoes -g outdated
bigdecimal (1.2.4 < 1.2.7)
hpricot (0.8.1 < 0.8.6)
json (1.8.1 < 1.8.2)
minitest (4.7.5 < 5.5.1)
psych (2.0.5 < 2.0.13)
rake (10.1.0 < 10.4.2)
rdoc (4.1.0 < 4.2.0)
test-unit (2.1.5.0 < 3.0.9)

SOLUTION
The following solution will default to en_US if an EncodingError is raised. Fully tested on 3.2.21 and working patch. https://bugs.ruby-lang.org/issues/10300#note-3

@BackOrder BackOrder added the Windows label Feb 19, 2015

@BackOrder BackOrder added this to the 3.2.22 milestone Feb 19, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 20, 2015

Contributor

I've put a Windows exe 3.2.22 (r1833) at the walkabout/public/shoes location that has the fix in its Ruby. You should see a VERSION.txt file in the Shoes directory and Cobbler should be showing all the info.

Contributor

ccoupe commented Feb 20, 2015

I've put a Windows exe 3.2.22 (r1833) at the walkabout/public/shoes location that has the fix in its Ruby. You should see a VERSION.txt file in the Shoes directory and Cobbler should be showing all the info.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

The patch seems to work but there are several problems with r1833:

  • cshoes -g outdated is not working.
  • cshoes -version returns 48 -0700 i386-mingw32 2.1.5.
  • VERSION.TXT contains shoes federales 3.2.22 r(1833) x86_64-linux 2015-02-19 18:44:20 -0700.
  • Revision is written r(1833) instead of r1833, the latter is preferred.
  • This revision reintroduce SSL certificate issue (see below).
cshoes -g install Onion
ERROR:  Could not find a valid gem 'Onion' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/specs.4.8.gz)
Exiting RubyGems with exit_code 2
Collaborator

BackOrder commented Feb 20, 2015

The patch seems to work but there are several problems with r1833:

  • cshoes -g outdated is not working.
  • cshoes -version returns 48 -0700 i386-mingw32 2.1.5.
  • VERSION.TXT contains shoes federales 3.2.22 r(1833) x86_64-linux 2015-02-19 18:44:20 -0700.
  • Revision is written r(1833) instead of r1833, the latter is preferred.
  • This revision reintroduce SSL certificate issue (see below).
cshoes -g install Onion
ERROR:  Could not find a valid gem 'Onion' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://api.rubygems.org/specs.4.8.gz)
Exiting RubyGems with exit_code 2
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 20, 2015

Contributor

Just to be sure, I've uploaded a slightly newer version but its only deleting comments and such in the rake files. Just tried on a bare VM without any of the devkit stuff or anything else.

cshoes.exe -g outdated works as does -g install onion AFTER Windows pops up a message to allow internet access. No ssl problems here. The gem version is 2.4.5 - I couldn't revert that if I tried.

cshoes.exe -v is a bug and I see what's wrong.

VERSION.txt isn't (shouldn't) used by used Windows or Linux -only that little unused OSX shell script cares. It is a build stamp. It shoes where it came from not what its running on.

Contributor

ccoupe commented Feb 20, 2015

Just to be sure, I've uploaded a slightly newer version but its only deleting comments and such in the rake files. Just tried on a bare VM without any of the devkit stuff or anything else.

cshoes.exe -g outdated works as does -g install onion AFTER Windows pops up a message to allow internet access. No ssl problems here. The gem version is 2.4.5 - I couldn't revert that if I tried.

cshoes.exe -v is a bug and I see what's wrong.

VERSION.txt isn't (shouldn't) used by used Windows or Linux -only that little unused OSX shell script cares. It is a build stamp. It shoes where it came from not what its running on.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

This revision is working on Windows XP but not on Windows 8. Disabled anti-virus and firewall for a moment without a positive result. By the way, github says 1834 commits but Shoes says r1835.

The question is — What is different from 3.2.21?

Collaborator

BackOrder commented Feb 20, 2015

This revision is working on Windows XP but not on Windows 8. Disabled anti-virus and firewall for a moment without a positive result. By the way, github says 1834 commits but Shoes says r1835.

The question is — What is different from 3.2.21?

ccoupe added a commit that referenced this issue Feb 20, 2015

Make splash screen build info shorter #50
Fix -v #71 comments - raise SystemExit bug with a date string inside. Go figure.
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 20, 2015

Contributor

Do not expect the revision count to match. Historically, the Shoes computation does a length-1 so I kept that. It's not a very accurate number. You could commit 12 changes and if I don't pull them, my count may be off.

The only changes from 3.2.21 are the rakefile related changes - and the ruby.c changes to add the new Shoes::VERSION_XXXX constants. That would not explain why my system is happy and your's is not.

Contributor

ccoupe commented Feb 20, 2015

Do not expect the revision count to match. Historically, the Shoes computation does a length-1 so I kept that. It's not a very accurate number. You could commit 12 changes and if I don't pull them, my count may be off.

The only changes from 3.2.21 are the rakefile related changes - and the ruby.c changes to add the new Shoes::VERSION_XXXX constants. That would not explain why my system is happy and your's is not.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

The reasonable expectation for the revision number for a release would be the current commit number you built the release with. This serves a a reference when bugs are found, then we know exactly where to look for

I did sync my local repo with github and the tightmingw is working fine. Built Shoes with the standard 2.1.5 + UndefinedEncoding patch and even the custom 2.1.5 built on XP. Would it be possible that the Ruby (or RubyGems) included in your build is broken?

Collaborator

BackOrder commented Feb 20, 2015

The reasonable expectation for the revision number for a release would be the current commit number you built the release with. This serves a a reference when bugs are found, then we know exactly where to look for

I did sync my local repo with github and the tightmingw is working fine. Built Shoes with the standard 2.1.5 + UndefinedEncoding patch and even the custom 2.1.5 built on XP. Would it be possible that the Ruby (or RubyGems) included in your build is broken?

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 20, 2015

Contributor

This serves a a reference when bugs are found, then we know exactly where to look for

Not really. r1278 has no relationship to the commits actually included. I can build without committing the change. I can build and set the rnnnn number manually if I like or have to.

Broken? Of course it's possible. Except it works for me. I downloaded it from the website in the bare Win7 VM. And it worked for you on XP There might be a newer one up by now. I'm doing a lot building and little commits to clean up the rake files. Expect more.

Contributor

ccoupe commented Feb 20, 2015

This serves a a reference when bugs are found, then we know exactly where to look for

Not really. r1278 has no relationship to the commits actually included. I can build without committing the change. I can build and set the rnnnn number manually if I like or have to.

Broken? Of course it's possible. Except it works for me. I downloaded it from the website in the bare Win7 VM. And it worked for you on XP There might be a newer one up by now. I'm doing a lot building and little commits to clean up the rake files. Expect more.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

Not really. r1278 has no relationship to the commits actually included. I can build without committing the change. I can build and set the rnnnn number manually if I like or have to.

There is no reason to have such revision number when it is not meaningful. We might as well stick to version number and short format build date.

Broken? Of course it's possible. Except it works for me. I downloaded it from the website in the bare Win7 VM. And it worked for you on XP There might be a newer one up by now. I'm doing a lot building and little commits to clean up the rake files. Expect more.

Could you 7z the Ruby used to build Shoes (full directory, not the one imported into Shoes) and upload it to your walkabout ftp? Let me test it here and report back to you.

Collaborator

BackOrder commented Feb 20, 2015

Not really. r1278 has no relationship to the commits actually included. I can build without committing the change. I can build and set the rnnnn number manually if I like or have to.

There is no reason to have such revision number when it is not meaningful. We might as well stick to version number and short format build date.

Broken? Of course it's possible. Except it works for me. I downloaded it from the website in the bare Win7 VM. And it worked for you on XP There might be a newer one up by now. I'm doing a lot building and little commits to clean up the rake files. Expect more.

Could you 7z the Ruby used to build Shoes (full directory, not the one imported into Shoes) and upload it to your walkabout ftp? Let me test it here and report back to you.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

my request might not be clear. I want the full directory of the Ruby imported into Shoes, the original directory inclding ruby.exe and all other things that are normally stripped down for the build.

Collaborator

BackOrder commented Feb 20, 2015

my request might not be clear. I want the full directory of the Ruby imported into Shoes, the original directory inclding ruby.exe and all other things that are normally stripped down for the build.

@BackOrder BackOrder closed this Feb 20, 2015

@BackOrder BackOrder reopened this Feb 20, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 20, 2015

Contributor

There is no way you can run that ruby from a command line because it's installed in /srv/chroot/mingwgtk2/bin ,lib, include, and it knows that. That's why the damn rake files have to rewrite shit. I doubt I can run ruby.exe even it if I did map a VM drive to the chroot .

However I can see how it might not have the latest ruby gems after applying the patch. It did for me but... I recompiled (cross) 2.1.5, copied the gem update, rebuilt Shoes and it's at http:// walkabout.mvmanila.com/public/shoes/shoes-3.2.22-gtk2-w32.exe NOTE the change in name from ...gtk2-32.exe to ...gtk2-w32.exe - could that cause a caching problem for you?

I also dropped the +1 bump on the commits counting.

Contributor

ccoupe commented Feb 20, 2015

There is no way you can run that ruby from a command line because it's installed in /srv/chroot/mingwgtk2/bin ,lib, include, and it knows that. That's why the damn rake files have to rewrite shit. I doubt I can run ruby.exe even it if I did map a VM drive to the chroot .

However I can see how it might not have the latest ruby gems after applying the patch. It did for me but... I recompiled (cross) 2.1.5, copied the gem update, rebuilt Shoes and it's at http:// walkabout.mvmanila.com/public/shoes/shoes-3.2.22-gtk2-w32.exe NOTE the change in name from ...gtk2-32.exe to ...gtk2-w32.exe - could that cause a caching problem for you?

I also dropped the +1 bump on the commits counting.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 20, 2015

Collaborator

I do not normally install those test but rather extract them to a temporary directory on my primary Windows machine to avoid breaking the existing Shoes and/or installing reinstalling cycle. Shoes behaves just fine in the past times and allowed me to test whatever needs to be tested.

In this instance, this is causing two problems for RubyGems — 1) outdated command returns nothing and 2) SSL certificate issue. This may have other important consequences, say, what happens if Shoes is installed in a custom directory?

Tightmingw works as far as portable installation. A distinctive difference emerged between tightmingw and your build: libffi-6.dll vs libffi-5.dll. Your build provides an older ffi library.

NOTE the change in name from ...gtk2-32.exe to ...gtk2-w32.exe - could that cause a caching problem for you?

Maybe. Not big fan of the new w considering that it is not Windows standard practice. An EXE file with 32 means a 32 bit executable for Windows.

Installing on Windows 8 works (patch, outdated, SSL certificate) and it would close this issue.

Collaborator

BackOrder commented Feb 20, 2015

I do not normally install those test but rather extract them to a temporary directory on my primary Windows machine to avoid breaking the existing Shoes and/or installing reinstalling cycle. Shoes behaves just fine in the past times and allowed me to test whatever needs to be tested.

In this instance, this is causing two problems for RubyGems — 1) outdated command returns nothing and 2) SSL certificate issue. This may have other important consequences, say, what happens if Shoes is installed in a custom directory?

Tightmingw works as far as portable installation. A distinctive difference emerged between tightmingw and your build: libffi-6.dll vs libffi-5.dll. Your build provides an older ffi library.

NOTE the change in name from ...gtk2-32.exe to ...gtk2-w32.exe - could that cause a caching problem for you?

Maybe. Not big fan of the new w considering that it is not Windows standard practice. An EXE file with 32 means a 32 bit executable for Windows.

Installing on Windows 8 works (patch, outdated, SSL certificate) and it would close this issue.

@BackOrder BackOrder closed this Feb 20, 2015

@pratiyushsapkota7

This comment has been minimized.

Show comment
Hide comment
@pratiyushsapkota7

pratiyushsapkota7 Jan 16, 2016

I exactly want to install the bootstrap-sass but it says install the autoprifixer-rails...then I try it says autoprefixer-rails 6.0.1 only supported by ruby 2.0. and I iunstall the autoprefixer 5.2.1.3 it get installed and bootstrap too but I says unable to convert U+2019 from UTF-8 to IBM437 for README.md................................................. I am getting this message when I install the gem autoprefixer-rails -v 5.2.1.3.........it is got installed 100 % but it gives the message I write above..and I installed the bootstrap-sass..it is also get installed.. I import all the file in css.scss files and run but the bootstrap is not working......

I exactly want to install the bootstrap-sass but it says install the autoprifixer-rails...then I try it says autoprefixer-rails 6.0.1 only supported by ruby 2.0. and I iunstall the autoprefixer 5.2.1.3 it get installed and bootstrap too but I says unable to convert U+2019 from UTF-8 to IBM437 for README.md................................................. I am getting this message when I install the gem autoprefixer-rails -v 5.2.1.3.........it is got installed 100 % but it gives the message I write above..and I installed the bootstrap-sass..it is also get installed.. I import all the file in css.scss files and run but the bootstrap is not working......

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Jan 16, 2016

Contributor

@pratiyushsapkota7. bootstrap-sass is for Rails. Shoes is not Rails and cannot use gems that depend on Rails/

Contributor

ccoupe commented Jan 16, 2016

@pratiyushsapkota7. bootstrap-sass is for Rails. Shoes is not Rails and cannot use gems that depend on Rails/

@pratiyushsapkota7

This comment has been minimized.

Show comment
Hide comment
@pratiyushsapkota7

pratiyushsapkota7 Jan 16, 2016

i am using the ruby 1.9.3...I did that in rails...I try to install bootstrap-sass gems...I add the gem in gem file gem 'bootstrap-sass'..and run the bundle installation it says first install gem autoprifixer-rails 6.0.1..and I again run the install gem autoprifixer-rails6.0.1 then it says you need ruby version 2.0.....but I try to install autoprefix-rails 5.2.1.3 and this gem got installed ..it says autoprefixer-rails installed 100 %................and error::unable to convert U+2019 from UTF-8 to IBM437 for README.md,skipping......and try for bootstrap but still does not work in my web page.......................................... but I need to install gem bootstrap..what should I do for that can you please help me..........I cant acces any bootstrap for my web page....@ccoupe

i am using the ruby 1.9.3...I did that in rails...I try to install bootstrap-sass gems...I add the gem in gem file gem 'bootstrap-sass'..and run the bundle installation it says first install gem autoprifixer-rails 6.0.1..and I again run the install gem autoprifixer-rails6.0.1 then it says you need ruby version 2.0.....but I try to install autoprefix-rails 5.2.1.3 and this gem got installed ..it says autoprefixer-rails installed 100 %................and error::unable to convert U+2019 from UTF-8 to IBM437 for README.md,skipping......and try for bootstrap but still does not work in my web page.......................................... but I need to install gem bootstrap..what should I do for that can you please help me..........I cant acces any bootstrap for my web page....@ccoupe

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Jan 16, 2016

Contributor

@pratiyushsapkota7 - The answer is in front of you. Upgrade to ruby 2.0 OR undo every mistake you've made by installing gems for the wrong version. Also, you need to find a better place to get help because your problem has nothing to do with Shoes and we can't help your rails problems.

Contributor

ccoupe commented Jan 16, 2016

@pratiyushsapkota7 - The answer is in front of you. Upgrade to ruby 2.0 OR undo every mistake you've made by installing gems for the wrong version. Also, you need to find a better place to get help because your problem has nothing to do with Shoes and we can't help your rails problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment