Ruby 我想设置对话,但遇到了此错误。当我运行';bundle exec rails s-b0.0.0';在window powershell中,它显示了这个 root@base-debootstrap:/vagrant#bundle exec rails s-b0.0.0 /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in'rename':文本文件busy@rb_file_s_rename-(/vagrant/tmp/pids/0.48546387545184877.3435,/vagrant/tmp/pids/unicorn.pid)(Errno::ETXTBSY) from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in'clobber_pid' from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:220:in`pid='1〕 from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in'start' from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/bin/unicorn:126:in`' from/vagrant/bin/unicorn:48:in'load' from/vagrant/bin/unicorn:48:in`'

Ruby 我想设置对话,但遇到了此错误。当我运行';bundle exec rails s-b0.0.0';在window powershell中,它显示了这个 root@base-debootstrap:/vagrant#bundle exec rails s-b0.0.0 /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in'rename':文本文件busy@rb_file_s_rename-(/vagrant/tmp/pids/0.48546387545184877.3435,/vagrant/tmp/pids/unicorn.pid)(Errno::ETXTBSY) from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in'clobber_pid' from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:220:in`pid='1〕 from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in'start' from/var/lib/gems/2.3.0/gems/unicorn-5.4.1/bin/unicorn:126:in`' from/vagrant/bin/unicorn:48:in'load' from/vagrant/bin/unicorn:48:in`',ruby,vagrant,Ruby,Vagrant,如果你能帮助我,我将非常感激 运行以下命令,这可能会对您有所帮助 root@base-debootstrap:/vagrant# bundle exec rails s -b 0.0.0.0 /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in `rename': Text file busy @ rb_file_s_rename - (/vagrant/tmp/pids/0.48546387545184

如果你能帮助我,我将非常感激

运行以下命令,这可能会对您有所帮助

root@base-debootstrap:/vagrant# bundle exec rails s -b 0.0.0.0
/var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in `rename': Text file busy @ rb_file_s_rename - (/vagrant/tmp/pids/0.48546387545184877.3435, /vagrant/tmp/pids/unicorn.pid) (Errno::ETXTBSY)
        from /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:190:in `clobber_pid'
        from /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:220:in `pid='
        from /var/lib/gems/2.3.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:137:in `start'
        from /var/lib/gems/2.3.0/gems/unicorn-5.4.1/bin/unicorn:126:in `<top (required)>'
        from /vagrant/bin/unicorn:48:in `load'
        from /vagrant/bin/unicorn:48:in `<main>'
您将获得进程pid,然后运行

  ps aux | grep 3000
或者您可以直接转到项目中的tmp->pids->server.pid并删除server.pid文件。
然后再次尝试启动服务器它将正常工作

您是否在VM所在的主机上打开了文件(例如在文本编辑器或IDE中)?否,我只是在Windows powershell中运行命令
  kill -9 pid