Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install munin-plugins-rails in a RVM box getting failed. #13

Open
kevincs opened this issue Apr 18, 2012 · 6 comments
Open

Install munin-plugins-rails in a RVM box getting failed. #13

kevincs opened this issue Apr 18, 2012 · 6 comments

Comments

@kevincs
Copy link

kevincs commented Apr 18, 2012

request-log-analyzer installed and runs normal

getting '`gem_original_require': no such file to load' error after installed in a RVM environment and ran $ sudo munin-run --debug vida_api_munin_rails_requests

Error:

About to run '/home/appname/.rvm/rubies/ruby-1.8.7-p352/bin/ruby /etc/munin/plugins/app_name_munin_rails_requests'

/home/appname/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require': no such file to load -- munin-plugins-rails (LoadError) from /home/appname/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /etc/munin/plugins/vida_api_munin_rails_requests:52

@ebertech
Copy link
Collaborator

I think you'll need to use rvmsudo because sudo doesn't necessarily set the right environment variables

@kevincs
Copy link
Author

kevincs commented Apr 18, 2012

@ebertech thanks, but get the same result after using $ rvmsudo munin-run --debug vida_api_munin_rails_requests

@ebertech
Copy link
Collaborator

oh, right munin-run will use the settings in plugin-conf.d. I need to patch this to support rvm. So, if you go to /etc/munin/plugin-conf.d there should be configuration files that look like vida_api_munin_rails_requests. If you open one up you can see the paths to various commands. You'll want to change command and env.request_log_analyzer. So do a

which ruby

and use that as your command value like this:

command /path/you/got %c

then do:

which request-log-analyzer

and change the env.request_log_analyzer setting to be

env.request_log_analyzer /path/to/request-log-analyzer

@kevincs
Copy link
Author

kevincs commented Apr 19, 2012

@ebertech thanks for the reply.

which ruby

/usr/bin/ruby

which request-log-analyzer

/usr/bin/request-log-analyzer

But the real request-log-analyzer gem is installed under ~/.rvm/gems/ruby-1.8.7-p352@rails2/gems/request-log-analyzer-1.12.0/bin

if I execute command "./request-log-analyzer" under the above directory. it runs ok

if I execute command "request-log-analyzer", it points to the /user/bin/request-log-analyzer and report error:
~/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems.rb:812:in `report_activate_error': Could not find RubyGem request-log-analyzer (>= 0) (Gem::LoadError)

I have also tried to rm /usr/bin/request-log-analyzer and soft link the ~/.rvm/gems/ruby-1.8.7-p352@rails2/gems/request-log-analyzer-1.12.0/bin/request-log-analyzer to /usr/bin/request-log-analyzer.

it still reports load error when execute request-log-analyzer:

/usr/bin/request-log-analyzer:5:in `require': no such file to load -- request_log_analyzer (LoadError)
from /usr/bin/request-log-analyzer:5

@ebertech
Copy link
Collaborator

can you run

rvm info

and paste the results here?

@evilsocket
Copy link

fixed with @ebertech instructions ... tnx i was getting mad XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants