Search code examples
ruby-on-railsrubymine

How to run ruby on rails application in RubyMine IDE


In python/flask, file app.py can be called from an IDE or the console to run an entire web application.

In Ruby on Rails, I use bin/rails server in the console to start a server to run the rails app, but I am having a hard time doing the same in RubyMine IDE. I tried running application_controller.rb file, but nothing happened.

Which file should I run in IDE to start the server and see the web app in action?


Solution

  • To run a Rails server from the reference Ruby Mine Doc

    1. Press Shift+Alt+F10, and choose the desired Rails run/debug configuration type.
    2. If necessary, change the run/debug configuration settings. To do that, choose Edit configurations... in the Run popup menu, and choose the desired Rails configuration type. Rails run/debug configuration dialog box appears.
    3. In this dialog box, modify the desired settings. For example, RubyMine suggests WEBrick as the default Rails server. You can select a different server from the list of supported servers.
    4. Click the I> button on the main toolbar.