ruby - Weird JRuby Interpreter Issue(s) in CircleCI Containers -


i'm trying activate jruby in containerized ci environment, machines running ubuntu: linux-3.13.0-91-generic-x86_64-with-ubuntu-12.04-precise, have script creating war files:

#!/bin/bash --login  if [ "$1" == "" ]; build_env="production" else build_env="$1" fi  echo "building for: $build_env"   rvm install jruby-9.1.2.0 rvm use jruby-9.1.2.0   rvm head function nightly_ci() {     if [[ "$(python -mplatform)" =~ .*ubuntu*. ]];             export path="$path:$home/.rvm/scripts/rvm"             chmod 755 ~/.rvm ~/.bashrc && echo rvm_autoupdate_flag=0     >> ~/.rvmrc             printf '%s' '[[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm"' >> ~/.bashrc     fi } nightly_ci # install , package gems (fixes issues :gem/:ref gemfile) echo "bundle install --without development test profile" bundle install --without development test profile echo "bundle package --all" bundle package --all  # build war file, smartroom.war echo "rails_env=$build_env bundle exec rake assets:precompile" rails_env=$build_env bundle exec rake assets:precompile --trace echo "rails_env=$build_env bundle exec warble war" rails_env=$build_env bundle exec warble war --trace 

this works , on localhost, , run on containerized environment but after jruby interpreter explicitly invoked command line.

for example run script runs download jruby, make sure paths setup correctly, bundle installs necessary gems, makes war. however, not work in containerized environment because bundle install uses gems in native ruby version , not install correct gems jruby. if type rvm install jruby-9.1.2.0 after script executed tell me jruby installed and if rerun script works fine. thinking possible bash profile misconfigured not appear so. here bashrc on container:

source ~/.circlerc &>/dev/null  export path="$path:$home/.rvm/bin" # add rvm path scripting  # next line updates path google cloud sdk. source '/opt/google-cloud-sdk/path.bash.inc'  # next line enables shell command completion gcloud. source '/opt/google-cloud-sdk/completion.bash.inc'  ### added heroku toolbelt export path="/usr/local/heroku/bin:$path" [[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm" 

and .profile:

# if running bash if [ -n "$bash_version" ];     # include .bashrc if exists     if [ -f "$home/.bashrc" ];         . "$home/.bashrc"     fi fi  # set path includes user's private bin if exists if [ -d "$home/bin" ] ;     path="$home/bin:$path" fi  export path="$path:$home/.rvm/bin" # add rvm path scripting  [[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm" # load rvm shell session *as function* 

my jruby version: jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f java hotspot(tm) 64-bit server vm 24.76-b04 on 1.7.0_76-b13 +jit [linux-x86_64]

lastly tried invoking exact set of commands via shell programmatically, (this needs done because i'm trying automate war generation during nightly-build), after script finished , reran script , no avail. hoping guys might have insight.

resolved changing circle phase package script executed i'm sure problem rvm 1.26.10.

https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f


Comments