Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Issues with rake binstub when updating from older jetpack version #40

@robbiegill

Description

@robbiegill

I am trying to update a project using a quite old fork of jetpack (Chorus/jetpack) to the current version, but am encountering issues with the binstubs bundler is producing.

Previously bin/rake had this content (from jetpack):

#!/bin/bash

set -e

export FULL_DIR=`cd $(dirname $0); pwd`
export PATH=$FULL_DIR:$PATH
export GEM_HOME="file:$CHORUS_HOME/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/gems/1.8"
export GEM_PATH="file:$CHORUS_HOME/vendor/jruby.jar!/META-INF/jruby.home/lib/ruby/gems/1.8:vendor/bundler_gem"

cd $(dirname $0)/..

.rake_runner "$@"

Now it is produced by bundler with a jruby shebang#!/usr/bin/env jruby:

#!/usr/bin/env jruby
#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rake', 'rake')

So, executing bin/rake (as before) fails because jruby in not in the path. Trying to execute it with bin/jruby -S bin/rake will complain about git not being installed when using gems from git repos. Both errors are unexpected/changes when using the vendored jruby/gem world from jetpack.

Any ideas? Am I still correct in assuming I should be able to use a jetpack app without jruby in the path?

Other details:

  • The gems are vendored in vendor/bundle/jruby/1.9/gems/
  • bin/jruby content:
#!/usr/bin/env bash

cd $(dirname $0)/..

export RUBY=bin/ruby #This is needed to prevent rake from exploding

GEM_HOME=vendor/gems exec java $CHORUS_JAVA_OPTIONS -jar vendor/jruby.jar --1.9 "$@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions