railsware / newrelic_platform_plugins

MIT License
42 stars 66 forks source link

newrelic_haproxy_agent is not in $PATH, and cannot install. #40

Open rackunits opened 10 years ago

rackunits commented 10 years ago

Following the available documentation: step 1

root@myservername:~# ln -s /usr/bin/gem1.9.1 /usr/bin/gem
root@myservername:~# gem list

*** LOCAL GEMS ***

root@myservername:~# gem install newrelic_haproxy_agent
Building native extensions. This could take a while...
To get started with this plugin, do
newrelic_haproxy_agent -h
to find out how to install and run the plugin agent.
Successfully installed multipart-post-2.0.0
Successfully installed faraday-0.9.0
Successfully installed json-1.8.1
Successfully installed newrelic_plugin-1.0.3
Successfully installed newrelic_haproxy_agent-1.0.1
5 gems installed
Installing ri documentation for multipart-post-2.0.0...
Installing ri documentation for faraday-0.9.0...
Installing ri documentation for json-1.8.1...
Installing ri documentation for newrelic_plugin-1.0.3...
Installing ri documentation for newrelic_haproxy_agent-1.0.1...
Installing RDoc documentation for multipart-post-2.0.0...
Installing RDoc documentation for faraday-0.9.0...
Installing RDoc documentation for json-1.8.1...
Installing RDoc documentation for newrelic_plugin-1.0.3...
Installing RDoc documentation for newrelic_haproxy_agent-1.0.1...

root@myservername:~# gem list

*** LOCAL GEMS ***

faraday (0.9.0)
json (1.8.1)
multipart-post (2.0.0)
newrelic_haproxy_agent (1.0.1)
newrelic_plugin (1.0.3)

Trying step 2:

root@myservername:~# newrelic_haproxy_agent install
-bash: newrelic_haproxy_agent: command not found

Command not found, so obviously the newrelic_haproxy_agent is not in $PATH

root@myservername:~# locate newrelic | grep bin
/var/lib/apt/lists/apt.newrelic.com_debian_dists_newrelic_non-free_binary-amd64_Packages
/var/lib/gems/1.9.1/bin/newrelic_haproxy_agent
/var/lib/gems/1.9.1/gems/newrelic_haproxy_agent-1.0.1/bin
/var/lib/gems/1.9.1/gems/newrelic_haproxy_agent-1.0.1/bin/newrelic_haproxy_agent

Looks like ithe gem was installed:

root@myservername:~/.gem# /var/lib/gems/1.9.1/bin/newrelic_haproxy_agent install
<internal:lib/rubygems/custom_require>:29:in "require": no such file to load -- bundler/setup (LoadError)
from <internal:lib/rubygems/custom_require>:29:in "require"
from /var/lib/gems/1.9.1/gems/newrelic_haproxy_agent-1.0.1/lib/newrelic_haproxy_agent.rb:4:in "<top (required)>"
from <internal:lib/rubygems/custom_require>:29:in "require"
from <internal:lib/rubygems/custom_require>:29:in "require"
from /var/lib/gems/1.9.1/gems/newrelic_haproxy_agent-1.0.1/bin/newrelic_haproxy_agent:5:in "<top (required)>"
from /var/lib/gems/1.9.1/bin/newrelic_haproxy_agent:19:in "load"
from /var/lib/gems/1.9.1/bin/newrelic_haproxy_agent:19:in "<main>"

I have no experience with ruby, so I'm stuck at step 2.

markathomas commented 10 years ago

gem install bundler

then repeat /var/lib/gems/1.9.1/bin/newrelic_haproxy_agent install