로컬 및 Heroku cedar 스택에서 Thin 웹 서버와 잘 작동하는 Rails 3.2.0 앱.
후:
$ git branch work
$ git checkout work
$ rails server
나는 얻다:
=> Booting Thin
=> Rails 3.2.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting
/Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server': no acceptor (RuntimeError)
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_server'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin/backends/tcp_server.rb:16:in `connect'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin/backends/base.rb:53:in `block in start'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `call'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/handler/thin.rb:13:in `run'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:265:in `start'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands/server.rb:70:in `start'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands.rb:50:in `tap'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.0/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
또한 내가 할 때 :
sudo bundle exec rails server thin -p 3000
나는 얻다:
/Users/peter/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/peter/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/peter/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/peter/.rvm/gems/ruby-1.9.3-p125/bin/bundle:18:in `<main>'
번 들러 1.0.22가 설치되어 있습니다. 업데이트하고 설치했습니다. 아무것도 작동하지 않는 것 같습니다. 어떤 아이디어?
1
머신의 다른 곳에서 이미 실행중인 서버가 있습니까? 아마도 오이 같은 거에요?
—
Josh Leitzel 2012 년
아뇨. 실제로 컴퓨터를 다시 시작하면 문제가 해결되었습니다. 오늘 다시 일어났습니다. 한 git 브랜치에서 다른 브랜치로 전환 할 때 발생하는 것 같습니다.
—
maeseele
감사! MacOSX에서 내 오류 메시지는
—
JJD
... eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
.
동일한 포트를 사용하여 두 개의 다른 응용 프로그램을 실행하려고 할 때도 마찬가지입니다. 이 주제로 인해 실행중인 다른 애플리케이션에 대해 생각하게되었습니다.
—
Vadorequest 2014