Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2011 09:32:57 GMT
From:      Ralf Gebhart <gebhart@secnetix.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/156217: port www/rubygem-passenger fails to install with ruby 1.9
Message-ID:  <201104060932.p369WvLn087573@red.freebsd.org>
Resent-Message-ID: <201104060940.p369eAxQ025645@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         156217
>Category:       ports
>Synopsis:       port www/rubygem-passenger fails to install with ruby 1.9
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 06 09:40:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ralf Gebhart
>Release:        7.4
>Organization:
secnetix GmbH & CoKG
>Environment:
FreeBSD nh1.xxx 7.4-RELEASE FreeBSD 7.4-RELEASE #2: Wed Mar 23 07:43:27 CET 2011     gebhart@xxx:/usr/obj/usr/src/sys/NH7  i386
>Description:
Port www/rubygem-passenger fails to install when using ruby 1.9:

===>  Checking if www/rubygem-passenger already installed
/usr/bin/env  /usr/local/bin/gem19 install -l --no-update-sources --no-ri --install-dir /usr/local/lib/ruby/gems/1.9 /usr/ports/distfiles/rubygem/passenger-3.0.4.gem -- --build-args 
Successfully installed passenger-3.0.4
1 gem installed
Installing RDoc documentation for passenger-3.0.4...
(cd /usr/local/lib/ruby/gems/1.9/gems/passenger-3.0.4 && lib/ruby/gems/1.9/gems/passenger-3.0.4/bin/rake19 nginx)
lib/ruby/gems/1.9/gems/passenger-3.0.4/bin/rake19: not found
*** Error code 127

Stop in /usr/ports/www/rubygem-passenger.
*** Error code 1

Stop in /usr/ports/www/rubygem-passenger.
*** Error code 1

Stop in /usr/ports/www/rubygem-passenger.

>How-To-Repeat:
When ruby 1.9 is installed from the ports and the following entries are
in /etc/make.conf:
RUBY_VER=1.9
RUBY_DEFAULT_VER=1.9

then install passenger:

cd /usr/ports/www/rubygem-passenger & make install
>Fix:
I guess, the problem is in /usr/ports/Mk/bsd.ruby.mk :

.if ${RUBY_VER} == 1.8
RAKE_BIN=       ${LOCALBASE}/bin/rake
.else
RAKE_BIN=       ${GEM_LIB_DIR}/bin/rake${RUBY_VER:S/.//}
.endif

There is usually no rake in the bin dir of a gem, in this case passenger.
The following patch works for me and seems reasonable to me to make sure, rake of ruby 1.9 is used:

*** bsd.ruby.mk.old     Wed Apr  6 11:31:15 2011
--- bsd.ruby.mk Wed Apr  6 11:31:28 2011
***************
*** 551,557 ****
  .if ${RUBY_VER} == 1.8
  RAKE_BIN=     ${LOCALBASE}/bin/rake
  .else
! RAKE_BIN=     ${GEM_LIB_DIR}/bin/rake${RUBY_VER:S/.//}
  .endif
  .endif
  
--- 551,557 ----
  .if ${RUBY_VER} == 1.8
  RAKE_BIN=     ${LOCALBASE}/bin/rake
  .else
! RAKE_BIN=     ${LOCALBASE}/bin/rake${RUBY_VER:S/.//}
  .endif
  .endif





>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104060932.p369WvLn087573>