Ruby was installed with a brew install command I installed ruby by calling the rbenv ecosystem.The screenshot indicates the User is browsing around the brew Cellar, which may indicate two things. In any event, that is not where the Ruby SDK is associated to a Rails project. Perhaps this was done and that dialog was reloaded later? Unless I am mistaken, one of those dialogs should have received its info and closed before going forward, at least during the wizard-like process. In the first screenshot from thesowismine, I see two dialogs for different purposes that are simultaneously open. I recommend doing the project import in the same way described in the jetbrains tutorial Opening Rails projects in IntelliJ IDEA. Place the following in your shell startup script system, whatever that may be: # rbenv config in my. To help with any confusion regarding the minimum support needed in the shell startup scripts. ruby-version file in the root of my rails project directory by running: rbenv local 2.3.1 Instead, I built the first ruby version directly from rbenv: rbenv install 2.3.1 Note that I've also stopped using ruby-build directly. Note, I am a previous user of rvm and rbenv. I am not blaming chruby, however I could not make the chruby system work properly with the IDE. To end this, I stopped using chruby and ruby-install. All but about 4 gems in my project's Gemfile was being highlighted as having an SDK problem. :)Īt the time, I was failing to get Intellij configured due to fact the gem files were not seen by the IDE. The posted url to Opening Rails projects in IntelliJ IDEA helped me feel the most confidence that we are on the right track. I wonder if Intellij is compatible with the way ruby-install lays out ruby? That's the one I used with chruby. The first requirement is that the ruby manager ( chruby, rbenv, rvm) is configured properly.Īnother concern is exactly where and how jetbrains expects the ruby installation to be organized. Olivia is correct, the "Project Structure." (Mac shortcut Cmd+ ) is the dialog for configuring the IDE to use different ruby installations. You can see the Ruby icon replaced the blue rectangle. Here's a screenshot of my new Ruby module. Once you've done that the module should appear with a Ruby icon on it and the rest should work as documented here: When I entered the module name it appended the name to the project's root directory which is probably not what you want. When you are prompted to enter the Module name, Content root, and Module file location, make sure the directories are set to your project's root. In the "New Module" pop-up select Ruby and the correct Module SDK (e.g. In the Modules settings, highlight the top-level project module and click the delete button (looks like a minus sign). Open the Project Structure dialog (File | Project Structure). Notice the icon is a folder with a blue rectangle in the lower, right corner. Here's a screenshot of my example project with the default Java module. There's no option to do because the existing module is configured as Java. With that module in place you cannot set a Ruby SDK at the module level. When you first open a project in IDEA, it assumes all your code is part of a Java module. It took a while to resolve because the Intellij documentation seems to be missing one critical piece. I ran into this problem with Intellij IDEA 2020.2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |