在我的web應用程序中設置搜索字段。我需要安裝elasticsearch和java,使用名爲searchkick的gem,用於此 。Rails 4:安裝elasticsearch&searchkick時出錯
已成功安裝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
當我嘗試推出elasticsearch使用此命令
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是檢測
值得注意的是執行該命令後仍然需要執行啓動命令。 – 2015-05-24 07:03:56