/usr/bin/env ruby_noexec_wrapper fails with no file or directory

一个人想着一个人 提交于 2019-11-30 11:38:46

make sure all the variables all set correctly, especially PATH and GEM_PATH, you can use this code to set the environment for you:

source /usr/local/rvm/environments/ruby-1.9.3-p194

add it in the service before chef-solr is run

My problem was similar, and so was my answer:

My problem was

Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper

ruby_noexec_wrapper was in ruby-1.9.3-p194@global not in the listed path

My solution was

source /usr/local/rvm/environments/ruby-1.9.3-p194@global

I upvoted mpapis because his answer was critical in finding mine. Feel free to upvote him rather than me. Just adding an additional answer to try and help anybody with a similar problem.

isawk

Answer not related to chef, but may help in future.

I had a similar issue, but since I was following a tutorial to setup thin in RVM. I fixed by using wrapper generated by RVM for thin service

/home/thin/.rvm/bin/bootup_thin

therefore changed line in init script

DAEMON=/home/thin/.rvm/gems/ree-1.8.7-2012.02/bin/thin

to

DAEMON=/home/thin/.rvm/bin/bootup_thin

Post on RVM wrappers RVM and thin, root vs. local user

I try all these answers, all failed. But I found another way to solve this problem, could be helpful:

gem install rubygems-bundler

You can also find answer from noexec library

I got this problem after installing ruby 2.0 on my mac. Part of that was I installed the latest rvm

rvm get stable

Then I started getting this error. Maybe I ran some 'gemset pristine's after this.

In any event, for me, this worked. WARNING! If you proceed as I have done, your gemsets for the ruby in question will get completely removed and rebuilt. Maybe you want a fresh backup? But this is the hammer.

# WARNING!!! THIS RECIPE IS POTENTIALLY DESTRUCTIVE!
rvm remove ruby-1.9.3-p194 # this will remove the gemsets for this version as well
rvm install ruby-1.9.3-p194 # time for coffee
rvm use ruby-1.9.3-p194
rvm gemset create aura-rover-config # my gemset name
rvm use ruby-1.9.3-p194@aura-rover-config # do I need to do this?  Can't 'member
bundle
# now it all works

The fun part of this was, all the little hacks I made in my installed gemsets, those got blown away. MAKE A BACKUP

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!