让Redis与ruby一起运行

时间:2022-04-17 00:13:14

I have installed Redis via gems, but am having a problem getting it started.

我已经通过宝石安装了Redis,但是在启动时遇到了问题。

Following James Edward Gary II steps http://blog.grayproductions.net/articles/setting_up_the_redis_server/

继James James Gary II之后的步骤http://blog.grayproductions.net/articles/setting_up_the_redis_server/

I have:

$ sudo gem install ezmobius-redis

Password:
Successfully installed ezmobius-redis-0.1
1 gem installed
Installing ri documentation for ezmobius-redis-0.1...
Installing RDoc documentation for ezmobius-redis-0.1...

$ redis-server path/to/redis.conf

-bash: redis-server: command not found

Any thoughts as to what I am missing?

有什么想法,我错过了什么?

2 个解决方案

#1


3  

If you have done just what you have described in your question, then you are missing redis. ezmobius-redis is just a Ruby library that allows connecting to redis. redis itself is a separate piece of software running independently.

如果你已经完成了你在问题中描述的内容,那么你就错过了redis。 ezmobius-redis只是一个允许连接到redis的Ruby库。 redis本身是一个独立运行的独立软件。

If you followed the article you linked and if you especially did this:

如果您按照链接的文章进行操作,如果您特别注意这一点:

curl -O http://redis.googlecode.com/files/redis-1.0.tar.gz
tar xzvf redis-1.0.tar.gz 
cd redis-1.0
make
sudo cp redis-server redis-cli redis-benchmark /usr/local/bin

then you have actually installed a very old version of redis into the /usr/local directory.

那么你实际上已经在/ usr / local目录中安装了一个非常旧版本的redis。

If you did this starting the server did not work, then you probably have /usr/local not in your PATH. You can start the server using:

如果你这样做,启动服务器不起作用,那么你的PATH可能没有/ usr / local。您可以使用以下命令启动服务器

$ /usr/local/bin/redis-server path/to/redis.conf

However, I would suggest to install the newest version of redis. To do that on OSX you should use homebrew: - Read this (https://github.com/mxcl/homebrew/wiki/Installation) as a guide on how to install homebrew and then do a

但是,我建议安装最新版本的redis。要在OSX上执行此操作,您应该使用自制程序: - 阅读本文(https://github.com/mxcl/homebrew/wiki/Installation)作为如何安装自制程序的指南,然后执行

brew install redis

to install the newest version of redis.

安装最新版本的redis。

#2


0  

You might need to open a new terminal to get the latest path settings. Try typing "bash" or "xterm &" and typing the redis-server command again.

您可能需要打开一个新终端才能获得最新的路径设置。尝试键入“bash”或“xterm&”并再次键入redis-server命令。

#1


3  

If you have done just what you have described in your question, then you are missing redis. ezmobius-redis is just a Ruby library that allows connecting to redis. redis itself is a separate piece of software running independently.

如果你已经完成了你在问题中描述的内容,那么你就错过了redis。 ezmobius-redis只是一个允许连接到redis的Ruby库。 redis本身是一个独立运行的独立软件。

If you followed the article you linked and if you especially did this:

如果您按照链接的文章进行操作,如果您特别注意这一点:

curl -O http://redis.googlecode.com/files/redis-1.0.tar.gz
tar xzvf redis-1.0.tar.gz 
cd redis-1.0
make
sudo cp redis-server redis-cli redis-benchmark /usr/local/bin

then you have actually installed a very old version of redis into the /usr/local directory.

那么你实际上已经在/ usr / local目录中安装了一个非常旧版本的redis。

If you did this starting the server did not work, then you probably have /usr/local not in your PATH. You can start the server using:

如果你这样做,启动服务器不起作用,那么你的PATH可能没有/ usr / local。您可以使用以下命令启动服务器

$ /usr/local/bin/redis-server path/to/redis.conf

However, I would suggest to install the newest version of redis. To do that on OSX you should use homebrew: - Read this (https://github.com/mxcl/homebrew/wiki/Installation) as a guide on how to install homebrew and then do a

但是,我建议安装最新版本的redis。要在OSX上执行此操作,您应该使用自制程序: - 阅读本文(https://github.com/mxcl/homebrew/wiki/Installation)作为如何安装自制程序的指南,然后执行

brew install redis

to install the newest version of redis.

安装最新版本的redis。

#2


0  

You might need to open a new terminal to get the latest path settings. Try typing "bash" or "xterm &" and typing the redis-server command again.

您可能需要打开一个新终端才能获得最新的路径设置。尝试键入“bash”或“xterm&”并再次键入redis-server命令。