Ruby on rails 工头立即解雇

Ruby on rails 工头立即解雇,ruby-on-rails,macos,path,redis,foreman,Ruby On Rails,Macos,Path,Redis,Foreman,我最近在不同的计算机上安装了OSX和Ubuntu。然后我尝试为这两个操作系统安装redis和foreman。这两个错误都没有抛出任何标志,似乎都成功执行了。但是,每当我使用foreman start启动foreman时,我在两台计算机上都会遇到以下问题: 23:48:35 web.1 | started with pid 1316 23:48:35 redis.1 | started with pid 1317 23:48:35 worker.1 | started with pid 1

我最近在不同的计算机上安装了OSX和Ubuntu。然后我尝试为这两个操作系统安装redis和foreman。这两个错误都没有抛出任何标志,似乎都成功执行了。但是,每当我使用
foreman start
启动foreman时,我在两台计算机上都会遇到以下问题:

23:48:35 web.1    | started with pid 1316
23:48:35 redis.1  | started with pid 1317
23:48:35 worker.1 | started with pid 1318
23:48:35 redis.1  | [1317] 11 Jun 23:48:35.180 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
23:48:35 redis.1  | [1317] 11 Jun 23:48:35.181 * Increased maximum number of open files to 10032 (it was originally set to 256).
23:48:35 redis.1  | [1317] 11 Jun 23:48:35.181 # Creating Server TCP listening socket *:6379: bind: Address already in use
23:48:35 redis.1  | exited with code 1
23:48:35 system   | sending SIGTERM to all processes
23:48:35 worker.1 | terminated by SIGTERM
23:48:35 web.1    | terminated by SIGTERM
出于某种原因,这对我来说似乎是一个路径问题,因为Redis或Foreman似乎无法找到成功执行所需的文件,但我不太确定

在OSX上,我使用了
gem install foreman
Brew install Redis

在Ubuntu上,我使用了以下内容:

Redis:

$ cd ~
$ wget http://download.redis.io/redis-stable.tar.gz
$ tar xvzf redis-stable.tar.gz
$ cd redis-stable
$ make
$ make test 
工头:

$gem安装工头

我在OSX上的路径如下:

/Users/c/.rvm/gems/ruby-2.1.0/bin:/Users/c/.rvm/gems/ruby-2.1。0@global/bin:/Users/c/.rvm/rubies/ruby-2.1.0/bin:/Users/c/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

在Ubuntu上,我的路径是:

/usr/local/bin:/usr/lib/postgresql:/usr/lib/postgresql/9.3:/usr/lib/postgresql/9.3/lib:/usr/lib/postgresql/9.3/bin:/usr/share/doc:/usr/share/postgresql-9.3:/usr/share/postgresql/9.3:/usr/share/postgresql/9.3:/man:$PATH

Redis server似乎成功执行了一次,然后失败,并显示以下消息:

[1457] 12 Jun 00:02:48.481 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[1457] 12 Jun 00:02:48.482 * Increased maximum number of open files to 10032 (it was originally set to 256).
[1457] 12 Jun 00:02:48.483 # Creating Server TCP listening socket *:6379: bind: Address already in use
尝试
$redis服务器停止
返回:

[1504]6月12日00:05:56.173#致命错误,无法打开配置文件“停止”

我需要帮助,弄清楚如何让Foreman和Redis一起工作,这样我就可以在127.0.0.1的浏览器中查看我的本地文件

编辑

Redis确实启动了,但当我导航到localhost:6379时,什么也没有发生。我还尝试了寻找过程的建议。它发现

c                751   0.0  0.0  2432768    596 s005  R+    2:03PM   0:00.00 grep redis
c                616   0.0  0.0  2469952   1652 s004  S+    2:01PM   0:00.05 redis-server *:6379
试图
kill
进程将导致

kill:用法:kill[-s sigspec |-n signum |-sigspec]pid | jobspec ... 或者杀死-l[sigspec]


尝试使用以下命令启动Redis server:

redis-server <path to your config file>
然后,如果找到流程:

kill <process id>
杀死 重新启动redis服务器

  • 列出使用终端运行的redis服务器 命令:ps aux | grep redis
  • 在列表中记下要终止的服务器的“pid”编号示例pid:5379
  • 使用命令:kill 5379

  • 这一行程序将杀死所有现有的redis服务器,然后启动一个新的redis服务器。当磨合Foreman时,它不会发送导致Foreman退出的SIGTERM,发送SIGINT让Foreman继续

    (ps aux | grep 6379 | grep redis | awk{print$2}| xargs kill-s SIGINT)和&redis服务器

    在Procfile.dev中:


    redis:(ps aux | grep 6379 | grep redis | awk{print$2}| xargs kill-s SIGINT)和&redis服务器

    我在上面提到过,服务器使用redis服务器启动一次。我找到了一个进程,但键入kill不起作用。更多信息,请参见更新的问题在出现一系列错误后,我简单地恢复为“rails s”,而不是“foreman start”。
    kill <process id>