Ruby on Rails webrick服务器在RubyMine中自行关闭

时间:2014-06-02 23:12:26

标签: ruby-on-rails rubymine webrick

我最近开始使用RubyMine,出于某种原因,我无法启动webrick服务器来查看我正在构建的应用程序。到目前为止,我喜欢RubyMine并希望能让它工作,并且想知道是否有人看到过这个错误:

[2014-06-02 16:40:41] INFO  WEBrick 1.3.1
[2014-06-02 16:40:41] INFO  ruby 1.9.3 (2014-02-24) [i386-mingw32]
Exiting
[2014-06-02 16:40:41] WARN  TCPServer Error: Permission denied - bind(2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `initialize': Permission denied - bind(2) (Errno::EACCES)
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `new'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:85:in `block in create_listeners'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:82:in `each'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/utils.rb:82:in `create_listeners'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:82:in `listen'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:70:in `initialize'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:45:in `initialize'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/handler/webrick.rb:10:in `new'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/handler/webrick.rb:10:in `run'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.18/lib/rails/commands/server.rb:70:in `start'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.18/lib/rails/commands.rb:55:in `block in <top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.18/lib/rails/commands.rb:50:in `tap'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.18/lib/rails/commands.rb:50:in `<top (required)>'
    from C:/Users/Bear/RubymineProjects/HandCoOp/script/rails:6:in `require'
    from C:/Users/Bear/RubymineProjects/HandCoOp/script/rails:6:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

我做了一些研究,似乎端口3000上有一个进程已经运行了?我不知道这是否是一个正确的假设,我将继续浏览网页以查找故障排除选项。谢谢有人看看!

1 个答案:

答案 0 :(得分:0)

添加Gemfile: -

gem 'thin'

然后: -

bundle install

启动服务器: -

thin start