无法打开 Rails 服务器 [英] can't open rails server
问题描述
我不知道我做了什么.我想我更新了我的 Ruby on Rails.更新后,我在运行 $rails 服务器时总是出错.
I don't know what I did. I think I updated my Ruby on Rails. After updating it, I always get error when running $rails server.
输出是
ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/utils.rb:73:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)
我会重新启动控制台并运行 rails 服务器,它可以正常工作几分钟,但随后它会停止响应,如果我重新启动 rails 服务器,它会再次出现该错误.我尝试在不同的端口上运行(rails s -p 9191),但它给了我同样的问题.
I would restart the console and run rails server and it would work fine for a couple of minutes but then it would stop responding and if I restart rails server it would give me that error again. I tried running on different port (rails s -p 9191) and it gives me the same problem.
任何想法我做错了什么?谢谢你们
Any Ideas what I did wrong? Thnx guys
推荐答案
在其他端口运行:
rails s -p 3001
所以它会加载到 localhost:3001
或杀死所有 ruby 进程:
or kill all ruby processes:
killall ruby
然后运行 rails s
这篇关于无法打开 Rails 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!