Setup rubymine to execute commands over ssh - ruby-on-rails

I'd like to setup a rails development environment where everything is running in a Ubuntu VM but I use windows 7 for display.
Under ububtu (Which is a virtualbox VM)
ruby
rails environment (rvm, rails, rails webserver...)
git
Under Windows (native OS)
browser
IDE
I SSH into the VM for executing commands, and files are shared with nfs.
Everything works great, but I would like to try RubyMine as my editor. So in this setup I have two choices:
Install RubyMine on windows, and configure it so it executes it's commands in the VM via SSH.
Install RubyMine on ubuntu, and display it in windows with a X server running on windows (such as Xming) : rubymine --display windows_ip:0
So my question is : Is it possible to configure rubyMine so that it executes commands via SSH ?
I have seen this feature request, so my guess it that it's not currently possible.

Currently we're working on this feature and it will be available in the next 5.0 EAP

Related

Setup Redmine & plugins on local machine then deploy to Linux server, possible?

I am new to Ruby on Rails. My questions is:
Is it possible to setup Redmine and install the plugins on my local machine (macOS Sierra), test the Redmine application on localhost, once everything has been done successfully, then only deploy it on a Linux server?
If it is possible, which part of the code should I modify in order to deploy it on Linux server successfully? (Both of my local machine and Linux server are running MySQL database)
Yes it is possible and you don't need to change any part of the Redmine code to do so. Deployment of Rails apps is often done with a tool called Capistrano (http://capistranorb.com/), which executes through ssh on your server, checks out the code and does any additional installation steps necessary. This approach requires you to have your app (Redmine and plugins in your case) in a git repository (or subversion etc). In the simplest case, fork redmine on github and add any plugins as git submodules.
As you're unfamiliar with the platform I'd suggest to start with a simple rails app that you create locally. once you have worked out deployment of that to a remote server, tackle Redmine.
Sounds like a lot of upfront effort but it's worth it since it enables you to work on your local machine, make changes and then deploy the changed code with a single command.
If the Redmine installation on your local host has the same installation path as on the production server, then you can just copy the installation files to the production server. You will also have to copy the database to the production server.
If the installation path is different on your local host and production server, then you will have to install the Redmine and plugin on your production server

How to run Sidekiq on Windows

Today im trying to setup my windows 10 machine with all my Rails environment. While trying to run the bundle exec sidekiq command to boot up Sidekiq i get the following error:
It seems that 'daemon() function is not implemented on this machine'. My first guess is that a process in windows does not run as daemon but does as a service?
Environment:
Windows 10
Ruby 2.3.0 x64
Devkit
Tried also dropping the -d option but i get the same error.
You can't daemonize on Windows. Daemonizing is a legacy option for older Unix systems that only support init.d, no modern systems recommend using it anymore.

How do you setup a RubyMine rails project to work with a remote ruby install?

My dev machine is running Windows, IntelliJ Idea 13 (EAP), and VirtualBox. I run a virtual linux server with ruby (setup to match the production server I'll deploy to). I have configured IntelliJ to use the ruby SDK on the (virtually) remote server, but I am having problems creating new rails projects because it is trying to pass windows local paths to the remote ruby install.
On my windows, I try to create the project in D:\Projects\MyRubyProject
On the VM, that dir maps to /projects/MyRubyProject
In the new project dialog, I would like to set the content root to /projects/MyRubyProject, but if I do it says it doesnt exists and ask to create it, when it creates it, it is created in the IntelliJ install dir. I tried giving it the same type of ssh:// path that the remote SDK accepts, but it just silentl fails.
Any suggestions or is this something that is just not supported?
i tried also.
just use "Configuring Remote Interpreters via Virtual Boxes" https://www.jetbrains.com/ruby/webhelp/configuring-remote-interpreters-via-virtual-boxes.html
Rubymine don't offer the possibility to create new rails project remotely.

deploy ruby or rails on windows [duplicate]

I'm looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual machine?
Also, this will be an internal app, so performance isn't my number once concern.
Windows is not the usual place to deploy production Rails apps, but there are people who do it. Mongrel was originally written to give better deployment options for Windows. As it turned out the UNIX deployment options weren't that good either. :)
Start with the Ruby One Click installer so you have a sane installation of ruby and rubygems.
From there, you install the rails gem and the gem for your database like you normally would. Most if not all of the databases have Windows gems.
Make sure to install mongrel_service to be able to control each mongrel like a normal windows service. See mongrel_rails service::install -h for details.
Once you have your mongrels set up, it's similar to a UNIX deployment. You set up a reverse proxy, such as Apache2 and you're set.
You might run into some gems (such as BackgroundRB) that will not work under Windows because they have C code that either rely on UNIX libraries or expect a UNIX-like build system at installation time. However, all of the really important Rails gems, such as Mongrel and the database adapters, have gems with pre-built binaries available, so you'll be fine.
Just grab the Bitnami RedMine stack.
Or the Bitnami Ruby on Rails stack.
Redmine ran fine on our Windows build server from the command line, sans IDE, using Mongrel and SQLite. Granted, ours isn't a VPS, but at any rate Linux isn't required for this app.
The BitNami Redmine Stack is a free, up to date Windows installer package for Redmine on Windows, Linux, OS X... give it a try. You can also download a VMWare Virtual Machine as well
I had good luck in the past with InstantRails, but I'm not sure how up-to-date it is now, as the project has changed hands several times.
You might also try ruby stack or flash rails, though I've not used either personally.
You can install SQLite and a Rails server like Mongrel on a Windows machine. I used Aptana to run a development environment, but I'm sure that there are better alternatives that don't require the IDE to be open to run. But this proves it is possible.
Try using a Rails distribution like: http://instantrails.rubyforge.org/wiki/wiki.pl
One download install for rails+ruby+mysql on Windows.

Ruby on Rails and .NET Continous Integration & Version Control Setup

I'm a .NET developer and I've set up a git repository and teamcity on a windows server machine. I'm also starting to use/learn ruby and I'll be wanting to setup some CI for ruby on rails as well.
I was wondering what the best setup for this would be. I've only one machine I can use as a server.
Everything on Windows Server - I expect this will make things difficult for the ruby CI. I'm developing ruby on an Ubuntu VM inside windows 7.
Everything on Ubuntu (or other Linux) server - Big problems for .Net as I mono isn't up to date with some of the newest .net tech I use.
A windows server hosting a virtual Ubuntu server. Git and Ruby CI on the Ubuntu server and teamcity on the windows server.
The last choice is my favourite at the moment. But before investing lots of time in setting it all up I was wondering what others may have done in this situation.
I'd also like to start with some continuous deployment as well.
TeamCity will run rake tasks just fine. In fact, we use a rake task to package up our .net solution and deploy it. If the deployment is not too complex, sticking with a rake task on a your Windows server is probably fine.
For a more complex scenario you'd probably want a *nix based machine using Capistrano. From what I've read using Capistrano on a Windows machine is very difficult, but I haven't tried it myself.
I'm running Ubuntu inside a VirtualBox on a Windows7 Host and it works perfectly. You don't need windows server os. I skipped all the .NET-stuff, so I don't have any experience in running VisualStudio and VirtualBox parallel on the same box, but in this scenario you should have at least(!) 4 GB RAM and SSD.

Resources