Unicorn无法启动rails app mac

时间:2014-03-22 17:58:14

标签: ruby-on-rails unicorn

我跟着这个tururial:https://blog.heroku.com/archives/2013/2/27/unicorn_rails

当运行commant" foreman start"在终点站内,我得到:

13:46:03 web.1  | started with pid 14964
13:46:04 web.1  | /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/bin/unicorn:110:in `block in <top (required)>': invalid argument: -p -c (OptionParser::InvalidArgument)
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/bin/unicorn:10:in `new'
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/gems/unicorn-4.8.2/bin/unicorn:10:in `<top (required)>'
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/bin/unicorn:23:in `load'
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/bin/unicorn:23:in `<main>'
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
13:46:04 web.1  |   from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
13:46:04 web.1  | exited with code 1
13:46:04 system | sending SIGTERM to all processes
SIGTERM received

服务器无法运行。是什么造成的?我在正确的app目录中。

1 个答案:

答案 0 :(得分:1)

看起来端口未在您的本地环境中设置。请尝试使用此命令运行:

foreman start PORT=3000

在Heroku中,这必须为你设定,他们可能在教程中忽略了它。