[英]Rails server doesn't start in production
I'm trying to start my first production rails server on DigitalOcean
but after 我正在尝试在
DigitalOcean
上启动我的第一个生产Rails服务器,但是之后
$ rails server — binding=my_Droplet_ip_address
i get this error 我得到这个错误
Exiting
/home/username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:78:in `require': cannot load such file -- rack/handler/— (LoadError)
from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:78:in `try_require'
from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:16:in `get'
from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:290:in `server'
And so on. 等等。
App works fine locally and simple rails s
on server also works fine. App在本地运行良好,服务器上的简单
rails s
也可以正常运行。
I have Ubuntu 14.04
server with postgres
, nginx
and passenger
. 我有带有
postgres
, nginx
和passenger
Ubuntu 14.04
服务器。
I'm a complete newbie to it and I may have missed something important. 我是一个新手,可能错过了一些重要的事情。 So tell me if you want me to provide any other info on this matter.
因此,请告诉我是否要我提供有关此问题的其他信息。
Just try rails s -b 0.0.0.0
And stop previous port 3000 used by rails 只需尝试使用
rails s -b 0.0.0.0
并停止使用rails的先前端口3000
To stop previous port. 停止上一个端口。 Try this command
Lsof wni -p 3000
尝试使用此命令
Lsof wni -p 3000
If you are running on 3000
port 如果您在
3000
端口上运行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.