[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
IlUuTkFLQU1VUkEiIDx1c2FAZ2FyYmFnZWNvbGxlY3QuanA+IHdyb3RlOgo+IEhpLCBFcmljLAo+
[ruby-core:83995] [Ruby trunk Bug#13997] Bundler gem binstub broken
From:
hsbt@...
Date:
2017-11-30 07:32:43 UTC
List:
ruby-core #83995
Issue #13997 has been updated by hsbt (Hiroshi SHIBATA).
I've confused because your first report says.
```
>/home/hone/.rvm/gems/ruby-2.4.1@global/bin/bundle:22...
```
I try your instructions. but I couldn't reproduce it. In current trunk:
```
./configure --with-openssl-dir=/usr/local/opt/openssl --prefix=$HOME/.rbenv/versions/trunk --enable-load-relative
make
make install
```
I got this.
```ruby
~ > cat ~/.rbenv/versions/trunk/bin/bundle
#!/bin/sh
# -*- ruby -*-
_=_\
=begin
bindir="${0%/*}"
exec "$bindir/ruby" "-x" "$0" "$@"
=end
#!/usr/bin/env ruby
# frozen_string_literal: true
# Exit cleanly from an early interrupt
Signal.trap("INT") do
Bundler.ui.debug("\n#{caller.join("\n")}") if defined?(Bundler)
exit 1
(snip)
```
It fixed r60174 maybe. Can you try current HEAD(r60928)?
----------------------------------------
Bug #13997: Bundler gem binstub broken
https://bugs.ruby-lang.org/issues/13997#change-68074
* Author: hone (Terence Lee)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 2.5
* ruby -v: ruby 2.5.0preview1 (2017-10-10 trunk 60153) [x86_64-linux]
* Backport:
----------------------------------------
Hi,
In Ruby 2.5.0-preview1, I'm seeing the following error if the Rubygems binstub PATH precedes the binstubs from ruby and the Bundler version installed is <= 1.15.4 (what ruby vendors).
~~~
/home/hone/.rvm/gems/ruby-2.4.1@global/bin/bundle:22:in `load': /tmp/bundler/lib/ruby/gems/2.5.0/gems/bundler-1.15.4/exe/bundle:4: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' (SyntaxError)
exec "$bindir/ruby" -x "$0" "$@"
^
/tmp/bundler/lib/ruby/gems/2.5.0/gems/bundler-1.15.4/exe/bundle:9: syntax error, unexpected keyword_do_block, expecting end-of-input
Signal.trap("INT") do
~~~
The reason for this is because the generated bundler binstub by rubygems runs code like this:
~~~
load Gem.bin_path('bundler', 'bundle', '>= 0.a')
~~~
The problem is that the binstub from the vendored bundler in ruby is not pure ruby:
~~~
#!/bin/sh
# -*- ruby -*-
bindir="${0%/*}"
exec "$bindir/ruby" -x "$0" "$@"
~~~
The top of this file is shell and not ruby. Kernel#load chokes on this.
Thanks,
Terence
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>