質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Redis

Redisは、オープンソースのkey-valueデータストアで、NoSQLに分類されます。すべてのデータをメモリ上に保存するため、処理が極めて高速です。

Q&A

解決済

1回答

2111閲覧

Cloud9でRedisのリコメンドエンジン「Recommendify」をインストールできない

tatsumu_

総合スコア11

Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Redis

Redisは、オープンソースのkey-valueデータストアで、NoSQLに分類されます。すべてのデータをメモリ上に保存するため、処理が極めて高速です。

0グッド

0クリップ

投稿2016/07/27 16:09

###前提・実現したいこと
こちらのサイトを参考に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

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

hiredis のインストールが必要なようですね

ソースコードを git clone してきて、make && sudo make install でインストールできるはずです

簡単に調べてみましたが、なにか参考になれば幸いです

Link

投稿2016/07/28 00:25

gouf

総合スコア2321

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

tatsumu_

2016/07/28 08:28

ご回答ありがとうございます。 gem 'hiredis' gem 'recommendify', '~> 0.3.8' gem 'redis', '3.2.0' とすることでインストールに成功しました。 $redis-server 別ターミナルで $ruby app.rb で解決しました。ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問