Rails Server remote Ruby SDK not finding unicorn_rails

So I have setup a virtualbox vm, and was able to configure ruby remote sdk.  Bundle install works at this point and so does rails server, but when I change the server type to unicorn I get the following error message:

Rails server launcher '/opt/rbenv/versions/2.1.0/bin/unicorn_rails' wasn't found in project

I have checked and that location does exist on the virtual machine, and I can start the app with unicorn if I login to the virtual machine and again I can use Web Brick via rubymine and remote sdk (but I'd like to be able to start the server, debug etc with the application server I plan on using) so I wanted to get this working properly.

I think it maybe a bug (since webbrick/rails server works fine)

The only other thing I can think of is to setup a "Path Mapping" but I don't know what to put in (under Rails Server when using Remote SDK the Path Mapping shows up) but according to this post http://devnet.jetbrains.com/thread/304841 that shouldn't be necessary.

I feel I'm so close to getting my environment setup.  Thanks for any input.

Edit: I attached a screenshot

Comment actions Permalink

Could you please reproduce the problem and attach RubyMine's log (Help|Show Log in ...)

Regards, Oleg.

Comment actions Permalink

Definitely.  Should be able to post them shortly (next couple hrs).


Comment actions Permalink

Sorry didn't get back earlier.... basically I had my system in a weird spot and didn't see anything in the logs so I wanted to finish cleaning up and test some more before figuring it out.

I am not seeing any messages produced, I removed my local version of ruby (rbenv) so now its only on the vagrant vm.  Now I'm getting the error on all web servers including web brick.  Seems like it shows the right directory to be install but its looking on my machine and not the vagrant virtual box.

While playing I also noticed that bundle install only works after I have setup a deployment via sftp to the vagrant virtualbox (not that this is a problem but I was for right/wrong expecting this to just work).  I also noticed that bundler didn't work if I moved the project to be mount to a folder other than /vagrant in the VM (which makes sense to me).

If there is anything else I can do to help out let me know, maybe I'm missing something (or need a mapping) but willing to look in another spot or do whatever to try and reproduce the problem/get you more info.


Comment actions Permalink

So I got it working with a work around!

FYI got a little more info.  I discovered that why the web brick stopped working was b/c reverted back and along the way something had created binstubs in my rails project.  Once I added binstubs I got web brick going again.

After figuring that out I created some binstubs for unicorn (which also created unicorn_rails), I was then getting a new message saying it couldn't find unicorn_rails on the remote (virtual machine) project home.  So I got a little creative and created the folder location and symbolic link it was saying was missing to my local project/bin/unicorn_rails (but I created it on my local machine).  Once I tricked it into thinking that the remote location existed on my local machine it all worked correctly and actually is using the remote rubysdk.

local project home:
remote project home:

Error Message:
  missing /home/myrailsapp/deploy/current/bin/unicorn_rails

  mkdir -p /home/myrailsapp/deploy/current/bin
  ln -s /home/braden/myrailsapp/bin/unicorn_rails /home/myrailsapp/deploy/current/bin/unicorn_rails

So everything is working to the best of my knowledge.  Haven't jumped into testing, etc.  But seems like this has to be a bug of some type.  Just not sure how exactly to type it up (and if bundler etc should work before I make a deployment entry with sftp or if its proper not to work til deployment is configured, b/c with the project folder being shared I don't need to sync files.... on the vagrant vm I have a symbolic link from the project_home -> /vagrant so that takes care of deploy).

Comment actions Permalink


to work with remote sdk you have to create deployment settings which will have mappings for your project home.
I understand that in vagrant case we could simplify this but it is not done yet (hope it will be some day :))
Please let me know if creating deployment settings with correct mappings will help for you.

Regards, Oleg.


Please sign in to leave a comment.