###前提・実現したいこと
こちらのサイトを参考にRecommendifyをインストールしようとしたところエラーが出て詰まりました。
環境はIDE(Cloud9)で言語はRubyです。
このサイトでの4番で躓いている状態です。
redisを触るのが初めてで何が原因か分からないので怪しい部分を全部載せました。
リコメンドエンジンに触れてみたいという理由でやっているので必ずしもrecommendifyを使用する必要はありません。回答者様のお知恵を拝借したいです。どうぞよろしくお願い致します。
###発生している問題・エラーメッセージ
Ruby
1gem 'recommendify', '~> 0.3.8'
$ gem install recommendify Building native extensions. This could take a while... ERROR: Error installing recommendify: ERROR: Failed to build gem native extension. current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/recommendify-0.3.8/ext /usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160727-3425-afh9zv.rb extconf.rb current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/recommendify-0.3.8/ext make "DESTDIR=" clean rm -f *.o current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/recommendify-0.3.8/ext make "DESTDIR=" mkdir -p ../bin gcc -Wall recommendify.c -lhiredis -o ../bin/recommendify recommendify.c:4:29: fatal error: hiredis/hiredis.h: No such file or directory #include <hiredis/hiredis.h> ^ compilation terminated. make: *** [build] Error 1 make failed, exit code 2 Gem files will remain installed in /usr/local/rvm/gems/ruby-2.3.0/gems/recommendify-0.3.8 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/recommendify-0.3.8/gem_make.out $ bundle Your Gemfile has no gem server sources. If you need gems that are not already on your machine, add a line like this to your Gemfile: source 'https://rubygems.org' Could not find gem 'recommendify (~> 0.3.8)' in any of the gem sources listed in your Gemfile or available on this machine.
###試したこと
エラーメッセージ通りに試しました。
$ rm -f *.o $ mkdir -p ../bin $ gcc -Wall recommendify.c -lhiredis -o ../bin/recommendify gcc: error: recommendify.c: No such file or directory
また、redisのサーバー自体は立ち上がっているかと思いますが警告が出ていました。
$ redis-server [2908] 27 Jul 14:35:28.285 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf [2908] 27 Jul 14:35:28.286 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 8160. _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 2.8.4 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in stand alone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 2908 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' [2908] 27 Jul 14:35:28.381 # Server started, Redis version 2.8.4 [2908] 27 Jul 14:35:28.381 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. [2908] 27 Jul 14:35:28.381 * The server is now ready to accept connections on port 6379
###環境
言語:Ruby
開発環境:Cloud9
FW:Sinatra(のつもりでしたがgemでエラーが起きたのでまだ導入していません)
Redis:2.8.4
recommendify:~> 0.3.8
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/07/28 08:28