-
Notifications
You must be signed in to change notification settings - Fork 27
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 jetbrains
in pugin's searchbox. - Click on Install button(if it is already installed, it will show
Installed
button 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 sources
is selected and pressNext
. - Modify
Project Name
if desired, keep remaining fields at their defaults and PressNext
. - Make sure the project is identified as
Ruby
and pressNext
. - IntelliJ will search for frameworks. Make sure
Ruby on Rails
androutes.rb
are 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 detection
enabled by default:File -> Project Structure-> Facets-> Detection
Check Enable framework detection checkbox.
-
Click on Add configuration button from toolbar menu. Run/Debug Configuration will appear.
-
Click on
+
and click onRails
from 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