所以我用一个简单的
运行我的localhost rails s
它开始很好:
=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run 'rails server -h' for more start up options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
然后出现了这条消息:
A server is already running. Check C:/User/yahshef/sites/game/tmp/pids/server.pids.
Exiting
然后我检查了' C:/User/yahshef/sites/game/tmp/pids/server.pids'里面是:
9552
我删除了9552,但是当我运行它时,它就像前一个一样开始了:
=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run 'rails server -h' for more start up options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
然后这个有一个很大的变化,但它仍然是一个错误:(,它显示了这个:
Exiting
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.3/lib/rack/server.rb:353:in `kill': Invalid argument (Errno::EINVAL)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.3/lib/rack/server.rb:353:in `pidfile_process_status'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.3/lib/rack/server.rb:340:in `check_pid!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.3/lib/rack/server.rb:246:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands/server.rb:69:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/ralities-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
任何人都知道如何解决这个问题?我很感激。
修改:
请注意我在发布此问题之前做过研究
答案 0 :(得分:0)
打开终端并运行tasklist命令。这将显示进程列表,然后运行taskkill / pid PID(进程)或只是粘贴名称。
tasklist
taskkill /pid PID /f
/ f强行杀死进程。 http://www.addictivetips.com/windows-tips/kill-processes-from-the-command-prompt-in-windows-7/ https://technet.microsoft.com/en-us/library/bb491009.aspx
这两个链接可以为您提供详细帮助。