Then finally I could run Run > Debug and it allowed me to trigger breakpoints as shown below: I solved this by running the following in the Terminal (outside the IDE): gem install debase -pre I was then able to successfully open the Rails app in the browser open But then when I tried to Run > Debug so I could debug using breakpoints, it gave me the following errors: I was then able to run the server Run > Run, which displayed: I was then able to click Ok to save the Run/Edit Config So I went back to Run > Edit Configurations window and click on "Rails > skag" where I could now use "Choose SDK from module" since there was now my "skag_server_rails" Module available in the drop-down that I just created, and no errors were apparent, as shown below: ![]() I'd now finished importing the Rails project I was working on as a Module, and it showed the following, so I clicked "Ok", as I was now ready to try and run my Rails server again: It then showed the following window, and I clicked "Finish". I then selected "Create module from existing sources" and clicked "Next", and it showed the following, with a blue checkbox shown next to my Rails project root directory that it found, so I clicked "Next" again: Then I navigated to my Rails project's root directory "'/Users/my_username/code/apps/_murmur/skag_server_rails" and clicked Open, which displayed the following. Then I clicked Modules, and clicked the icon "+", and selected "Import Module". But I could run the Rails server fine using Terminal (outside the IDE) with rails s.įirst I opened Run > Edit Configurations but "Choose SDK from module" didn't have any Project Modules available to select from the drop-down, so I had to create one as follows: Ruby v2.3.0 or latest Rails 5.1.2), and even starting a brand new project from scratch. idea/ folder, trying different Ruby or Rails versions (i.e. Other solutions also didn't fix the error. It occurred when I tried to Run or Debug my Rails server from within IntelliJ. It took me an entire day to solve the issue, so I've written a detailed explanation with screenshots to guide others. I was using Ruby v2.4.0 with Rails 5.0.2. Once RubyMine is restarted you should be able to right click on the spec test nameĪnd choose Run to run spec test or you can simple right click inside a block and choose run to just run a single block.I upgraded from RubyMine to IntelliJ Ultimate IDE 2017.1.5 and I encountered the same error "Run Configuration Error: Rails server launcher wasn't found in project". Select the correct version of ruby you want to use then press green arrow in the middle of the panels to make it default for current project,Īfter applying changes you might need to restart RubyMine to pick up the changes. This helps in running server as well as running RSPEC tests from within Rubymine, when running spec tests or a server it picks up correct version of gems. ![]() Setting up default Ruby version for a current Project ![]() Once gem is installed you should be good to run the project in Rubymine. It might prompt you about missing “ruby-debug-ide” gem and will give you an option to install that, say yes Rubymine will install missing gem for you, Select PostgreSQL as Data Sourceįrom Run menu, you can run the newly created project in regular or debug mode, when running it debug mode, Then go to Database tool window, and press”New” button to add database configuration. Go to View menu -> Toolbar windows, select Database. You can setup Database tool to point to your PG database which makes it easier to view table records in RubyMine itself. Once project is created, you will be prompted to add git root in order to hook up with git for VCS operations.Ĭlick on configure link in the pop up above, once presented with Version Control settings everything should already be populated for, press “Ok” there ![]() This will prompt you about the directory selected in Location field not being empty, go-ahead and press “Yes” Select Ruby SDK version to point to correct Ruby version, that should auto select correct Rails version for you. Select to Add “Rails application” on the left, then in Location point to the location where you have source code checked out for example “/home/hkataria/dev/manageiq”
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |