-
Notifications
You must be signed in to change notification settings - Fork 26
Running Bonnie in IntelliJ IDEA
Prerequisite: You have completed Mac installation Instructions and IntelliJ Idea ultimate edition installed.
- Go to plugins dialog: From the Menu
IntelliJ IDEA -> Preferences -> Plugins(or use shortcut⌘,). - Type
ruby by jetbrainsin pugin's searchbox. - Click on Install button(if it is already installed, it will show
Installedbutton grayed out). - Once the installation is complete, click on okay and restart the IntelliJ IDEA.
- For more informations follow official guide by IntelliJ.
- If IntelliJ is already opened to an existing project, From menu
File -> New -> Project from Existing Sources....
Or - Open Intellij and from the splash screen select
Import Project.
Then - Ensure
Create project from existing sourcesis selected and pressNext. - Modify
Project Nameif desired, keep remaining fields at their defaults and PressNext. - Make sure the project is identified as
Rubyand pressNext. - IntelliJ will search for frameworks. Make sure
Ruby on Railsandroutes.rbare found and checked, then pressFinish. - Once IntelliJ opens its editor window, a pop-up will appear in the lower right requesting to
Install Dependencies From package.json. PressRun 'yarn install'.
-
File-> Project Structure -> Project(or use short key⌘;), and provide path to Project compiler output e.g.PATH_TO_BONNIE_PROJECT/bonnie/out. - Click on Apply and then OK buttons from right bottom corner of window.
- Make sure that you have
frameworks detectionenabled by default:File -> Project Structure-> Facets-> DetectionCheck Enable framework detection checkbox.
-
Click on Add configuration button from toolbar menu. Run/Debug Configuration will appear.
-
Click on
+and click onRailsfrom left pane. -
From right pane change Unnamed to a more meaningful name, e.g. startbonnie. Ensure Environment is set to development.
-
Check Run browser checkbox.
-
Choose Ruby SDK: Check Other SDK radio button and select Ruby-2.7.2.
-
Click on Apply and OK.
-
Make sure the new configuration is selected in the dropdown and click on the green triangle icon. Bonnie rails server will start on
localhost:3000. -
For more information like running rake tasks or screenshots please refer: https://www.jetbrains.com/help/idea/opening-a-rails-project-in-intellij-idea.html