ridepopla.blogg.se

Rubymine vagrant
Rubymine vagrant












  1. #RUBYMINE VAGRANT INSTALL#
  2. #RUBYMINE VAGRANT FREE#

#RUBYMINE VAGRANT INSTALL#

I had already figured out performing bundle install and rspec commands through the RubyMine interface. by running: bin/rspec -helpĪnd then RubyMine can re-use the already running Spring server to speed itself up.I am experimenting with RubyMine's ability to use a "remote" Ruby sdk on a vagrant guest for all its Ruby Now, just SSH into your Vagrant box, start Spring, e.g.

#RUBYMINE VAGRANT FREE#

I skipped over testunit folder, as I do not use that, but feel free to add that also if you need it. This sets up RUBYLIB variable with RubyMine helpers. So, I added following lines to my /home/vagrant/.bashrc: # RubyMine-RUBYLIBĮxport RUBYLIB=$HOME/.rubymine_helpers/rb/testing/patch/common/:$HOME/.rubymine_helpers/rb/testing/patch/bdd/:$RUBYLIB Thanks to Oleg at Jetbrains ( RUBY-16324) I discovered that the required formatters are present in the vagrant box and all I need is to add them to ruby load path, before starting spring. This is because RubyMine injects a special formatter into rspec so that it can parse the output better. One could start a long-running spring from terminal SSH, but that would result in RubyMine complaining that it can not load teamcity formatter: cannot load such file - teamcity/spec/runner/formatter/teamcity/formatter (LoadError) The problem above is that spring closes itself down every time SSH connection is closed. Note: I actually use landrush to manage development boxes names and so I can configure remote ruby with a domain name and not worry about IP address changes when recreating the devbox. Now specs should still run (but take several seconds every time to boot up Rails, because spring is shut down after every connection). Then fill in the data as shown in the screenshot and when closing dialog, ensure that the newly added ruby is selected as active. Open Preferences and navigate Language & Frameworks > Ruby SDK and Gems, click + button and pick New remote…. Next step is to configure new Ruby SDK for the project. You can try out SSH connection: ssh -i ~/.ssh/parallels_key whoamiĬonfigure RubyMine to use remote ruby over SSH ssh folder: ln -s IdentityFile /Users/laas/project/.vagrant/machines/default/parallels/private_key ~/.ssh/parallels_key For easier access, I symlinked the key file to my. Now we know the IP address of the box and what keyfile is used. IdentityFile /Users/laas/project/.vagrant/machines/default/parallels/private_key So run this command to find out which key is in use: % vagrant ssh-config Vagrant might be using their vagrant_insecure_private_key for the SSH or, in my case, Parallels custom keypair, as I don’t use VirtualBox. Add RubyMine helpers to RUBYLIB to be able to start persistent spring instance.configure RubyMine remote ruby over SSH, not Vagrant.So, to take advantage of that you need to: Direct SSH to the rescueįortunately, direct SSH with keypair authentication is blazing fast: time ssh -i ~/.ssh/parallels_key whoamiĠ,01s user 0,01s system 21% cpu 0,114 total Might just be that I have everything set up correctly and it just takes that much time to get the configuration.īut what this means is that if you run RSpecs from RubyMine, they are slow to start, because RubyMine executes vagrant ssh-config every time ( RUBY-16186). When researching this issue, some people mention DNS or other Vagrant provider specific issues, but they complain of an order of magnitude slower (30-40 sec) connection. That’s probably because vagrant ssh-config takes most of that time to sort things out: % time vagrant ssh-config > /dev/nullĢ,53s user 0,79s system 77% cpu 4,269 total Vagrant ssh is slow to connect % time vagrant ssh -c whoamiĢ,57s user 0,73s system 82% cpu 3,984 total This is especially annoying when running single spec which should be fast. The problem is that every time I start rspec, it takes a few seconds to connect to the box, before actually doing anything. I use RubyMine and Vagrant for my Rails development and run RSpec specs from RubyMine for convenience.














Rubymine vagrant