在我的网络应用程序上设置搜索字段。为此,我需要使用一个名为 searchkick 的 gem 来安装 elasticsearch 和 java。
成功安装了 java 并在 Java 网站上验证了这一点(使用 firefox)->您已安装推荐的 Java(版本 7 更新 67)。
使用 brew 命令安装了 elasticsearch
见下面的代码
Neils-MacBook-Pro:yelpdemo neilpatel$ brew info elasticsearch
elasticsearch: stable 0.90.7, HEAD
http://www.elasticsearch.org
/usr/local/Cellar/elasticsearch/0.90.7 (31 files, 19M) *
Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/elasticsearch.rb
==> Caveats
Data: /usr/local/var/elasticsearch/elasticsearch_neilpatel/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_neilpatel.log
Plugins: /usr/local/var/lib/elasticsearch/plugins/
To have launchd start elasticsearch at login:
ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load elasticsearch now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
Or, if you don't want/need launchctl, you can just run:
elasticsearch -f -D es.config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
当我尝试使用此命令启动弹性搜索时
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
它给了我错误
launchctl: Couldn't stat("/Users/neilpatel/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist"): No such file or directory
nothing found to load
当我尝试
elasticsearch -f -D es.config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
我没有检测到 java