Permalink
Browse files

fix installing providded gems for rbx, fix #1430

  • Loading branch information...
1 parent 994d454 commit 2b9532c46d408be33b483c395b93c775b10a3300 @mpapis mpapis committed Jan 9, 2013
Showing with 10 additions and 2 deletions.
  1. +1 −0 scripts/functions/manage/rubinius
  2. +9 −2 scripts/functions/utility
View
1 scripts/functions/manage/rubinius
@@ -215,6 +215,7 @@ rubinius_install()
(
rvm_create_flag=1 __rvm_use
+ __rvm_rubygems_create_link "$rvm_ruby_home/bin/ruby"
)
__rvm_post_install
__rvm_bin_script
View
11 scripts/functions/utility
@@ -641,7 +641,9 @@ __list_remote_jruby_for()
rubygems_detect_ruby_lib_gem_path()
{
- ruby_lib_gem_path="$("${1:-ruby}" -rrbconfig -e "puts ::Kernel.const_get('RbConfig')::CONFIG['rubylibprefix']")/gems/"
+ ruby_lib_gem_path="$(
+ "${1:-ruby}" -rrbconfig -e "puts ::Kernel.const_get('RbConfig')::CONFIG['rubylibprefix']||::Kernel.const_get('RbConfig')::CONFIG['prefix']
+ ")/gems/"
case "$rvm_ruby_string" in
(jruby*)
ruby_lib_gem_path+="shared"
@@ -658,8 +660,13 @@ __rvm_rubygems_create_link()
rubygems_detect_ruby_lib_gem_path "${1:-ruby}"
# Add ruby's gem path to ruby's lib direcotry.
- \mkdir -p "$(dirname $ruby_lib_gem_path)"
+ \mkdir -p "$(dirname $ruby_lib_gem_path)" "$rvm_ruby_gem_home"
+ if
+ [[ -d "$ruby_lib_gem_path" && ! -L "$ruby_lib_gem_path" ]]
+ then
+ \mv -f "$ruby_lib_gem_path"/* "$rvm_ruby_gem_home"/ 2>/dev/null
+ fi
__rvm_rm_rf "$ruby_lib_gem_path"
if [[ -d "$rvm_ruby_gem_home" ]]

0 comments on commit 2b9532c

Please sign in to comment.