Why RubyMine 2.0.2 starts Webrick on different port each time I run/debug my app?

穿精又带淫゛_ 提交于 2019-12-22 10:28:58

问题


Each time I start my Rails 2.3.8 webapp under RubyMine, it's using a different port. This drives me mad, since I've to change the URL in the browser each time I want to test something. I'm unable to find any configuration option to change that. Anyone?


回答1:


This may not help because I'm using RubyMine 3, however, there is a dropdown menu in my toolbar for selecting the different development environments (e.g. production, development).

The dropdown menu is to the left of the green "Run" triangle. If you click on the list one of the options is "Edit Configurations" - this pops open a window that has server port configuration settings in it.

Hope this is the same in your version of RubyMine!




回答2:


Matt, please select "Choose port manually" instead of "Use any free port" in run configuration settings | Port section




回答3:


I am using rubymine 2.1.5. I needed to change the default port 3000 that ruby started on to something else such 8081. I had to open the menu

  • Run/Edit configurations
  • and on the opening modal you should select Rail/Production or developement (Production and developement are my deployement environment), then change your port to something else


来源:https://stackoverflow.com/questions/4519470/why-rubymine-2-0-2-starts-webrick-on-different-port-each-time-i-run-debug-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!