D
D
dmz92016-06-06 14:37:22
Ruby on Rails
dmz9, 2016-06-06 14:37:22

How to set up a ruby ​​(ror) + vagrant + rubymine @ win7x64 workbench?

There is a need to set up a working machine for development on ror (at least start picking redmine).
There is no communication experience, except for a few cursory glances.
Initial data:
system - windows7 x64
ide - rubymine - there is a good experience with the storm, so there are no options from jetbrains
vagrant - not so much a mod as a severe need to learn how to work with this tool. from the pros - somewhere they write that it is always better to have a "copy" of a combat vehicle (website), and indeed a convenient thing. trusty/ubuntu64 rises on it (tutorial on sawing ruby ​​on a vagrant, somewhere from off sources)
the first patient is redmine.
----------------------
Here's the bottom line
vagrant is a good thing and I like that without the need to install a separate OS, you can deploy a working, albeit console, Linux. but how then to work with it in conjunction with rubymine? and with the git?
1/ open and start the project "directly" through rubymine? those. stupidly "Open" the folder with the project (which already contains .vagrant and .git) - but then the gems installed in the virtual machine are not taken into account and he asks to install them locally (i.e. in a [email protected] environment) - what's the point? Well, in general, IMHO is not entirely true. environment - windows (why then vagrant)
2/ or how then to cling to the LAN on 127.0.0.1 via ssh? and allegedly arrange a "deploy" on the "localhost"? in this case, rubymine can be hooked to the database (if the ports are opened on the vagrant necessary). but then it turns out that the files will supposedly be transferred "over the network", and this adds an unnecessary intermediary between editing and writing files (as opposed to the case when files are directly written to disk) - although I'm not entirely sure here))
-------- --------------
I would like to know how it would be more correct in terms of maximum control over the project - in theory, it is necessary to steer the project entirely and completely from the ide and in case of "what" - it is easy to deploy more one working machine of the project developer

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Snytkin, 2016-06-06
@dima11221122

There are many resources like https://railsbox.io/ that allow you to configure the box for your needs. Rubmine has integration with vagrant in the following parts
- Allows you to manage containers from a pre-configured folder (up/down/provision/etc)
- Using the ruby ​​SDK from vagrant
- Running and debugging rails applications
The folder with the code is rummaged through the synced folder ( https:/ /www.vagrantup.com/docs/synced-folders/). As a Synced Folder on all platforms, I suggest using nfs. In particular, there is a vagrant-winnfsd plugin for Windows ( https://github.com/winnfsd/vagrant-winnfsd). In general, everything)

J
jarosluv, 2016-06-08
@jarosluv

My experience of assembling such a bundle was extremely sad. A year ago, I got the idea to try working with Ruby from under Windows, this system looked painfully good on a laptop with a touch screen. Evenings of at least two weeks I spent in the hope of launching this monster and setting everything up so that it was cool. Unfortunately, I don’t remember exactly what the problems were, but I remember that I first set up virtualization through Hyper-V, then tried to build a box for Ubuntu 14.04, because. ready-made were only for version 12, after which I connected it all with Rubymine in the hope that everything would work as in native Ubuntu. Breaking off at each of the steps, rummaging through heaps of manuals and creating an Issue in the GitHub of the project, we still managed to achieve the goal - with grief in half, with unnecessary crutches (like hooking up a remote Ruby interpreter), the link is up. But finally I was killed by the lack of a normal terminal. After a day of torment, I demolished Windows in favor of Linux.

V
vsuhachev, 2016-06-06
@vsuhachev

3/ Put inside a virtual desktop and work completely in Linux

D
dmz9, 2016-06-06
@dmz9

The code folder is shared using the synced folder ( https://www.vagrantup.com/docs/synced-folders/). As a Synced Folder on all platforms, I suggest using nfs. In particular, there is a vagrant-winnfsd plugin for Windows ( https://github.com/winnfsd/vagrant-winnfsd). In general, everything)

vagrant by default makes one shared folder between host and guest machines, /vagrant = folder where vagrant init was. what is the difference between them in a nutshell if possible? after all, you can have all the code in it, and sosno point 1 / about this was - if you open this folder with rubymine, it will become the project folder
--------------------
about connecting a remote ruby interpreter from vagrant - found tutorials muscle base? still forwarding extra. ports in vagrantfile ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question