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

ruby command not found #378

Closed
spuder opened this issue Oct 1, 2015 · 4 comments
Closed

ruby command not found #378

spuder opened this issue Oct 1, 2015 · 4 comments
Labels
Bug Something isn't working

Comments

@spuder
Copy link
Contributor

spuder commented Oct 1, 2015

If you use a basic install, you will get an error when you start elasticsearch

root@default-ubuntu-1204:~# service elasticsearch status
/etc/init.d/elasticsearch: line 120: ruby: command not found
elasticsearch  running with PID 14465
root@default-ubuntu-1204:~# curl localhost:9200
curl: (7) couldn't connect to host

The init script should be modified so that ruby isn't a dependency, or the documentation should show an example of how to install ruby. (The first being very preferred in my opinion)

@spuder
Copy link
Contributor Author

spuder commented Oct 1, 2015

Even if you install ruby and rubygems, you still get issues with the init script because the json gem isn't installed.

Init scripts really shouldn't depend on ruby and specific gems being available system wide.

root@default-ubuntu-1204:~# service elasticsearch status
ruby: no such file to load -- ubygems (LoadError)
elasticsearch  running with PID 14465
root@default-ubuntu-1204:~# apt-get install rubygems
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  ruby1.8-dev
The following NEW packages will be installed:
  ruby1.8-dev rubygems
0 upgraded, 2 newly installed, 0 to remove and 118 not upgraded.
Need to get 1,080 kB of archives.
After this operation, 5,899 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main ruby1.8-dev amd64 1.8.7.352-2ubuntu1.6 [631 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main rubygems all 1.8.15-1ubuntu0.1 [449 kB]
Fetched 1,080 kB in 1s (1,049 kB/s)
Selecting previously unselected package ruby1.8-dev.
(Reading database ... 76218 files and directories currently installed.)
Unpacking ruby1.8-dev (from .../ruby1.8-dev_1.8.7.352-2ubuntu1.6_amd64.deb) ...
Selecting previously unselected package rubygems.
Unpacking rubygems (from .../rubygems_1.8.15-1ubuntu0.1_all.deb) ...
Processing triggers for man-db ...
Setting up ruby1.8-dev (1.8.7.352-2ubuntu1.6) ...
Setting up rubygems (1.8.15-1ubuntu0.1) ...
root@default-ubuntu-1204:~# service elasticsearch status
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from -e:1
elasticsearch  running with PID 14465

@martinb3
Copy link
Contributor

martinb3 commented Oct 1, 2015

I agree completely. When we did the big 1.0 rewrite, we put off fixing this particular issue. But Init scripts are on the next release milestone. Check out #321.

@martinb3 martinb3 added the Bug Something isn't working label Oct 1, 2015
@spuder
Copy link
Contributor Author

spuder commented Oct 1, 2015

Thanks. I'll close this issue infavor of #321

@spuder spuder closed this as completed Oct 1, 2015
@martinb3
Copy link
Contributor

Hi folks -- could you try the 2.0.0_wip branch of this cookbook, and report back any issues in #321? It has the same init scripts now as the packaged version of ES; it's our goal to release a 2.0.0 version that works with ES 2.0.0. It does have some changes from the current version, but depending on how complex your resource usage is, you may or may not be affected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants