Rails not started in docker-composer on vagrant

I'm trying to run rails in docker-composer on a vagrant which runs on Windows 7.
After setup the remote SDK, RubyMine fails to start up rails with the following error.

 

/usr/local/bin/ruby -e $$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift) /opt/project/bin/rails server -b 0.0.0.0 -p 3000 -e development
-e:1: syntax error, unexpected '.'
.sync=true;.sync=true;load(
^
-e:1: syntax error, unexpected '.', expecting end-of-input
.sync=true;.sync=true;load(

 


Next, I tried to run rails exclude "Ruby arguments" such as "-e $$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift)" from "Run/Debug Configurations". RubyMine success to start up rails.

How to avoid the above errors?

0
4 comments

Could you provide more details about your configuration? Am I right that you are developing on Windows docker-compose application with virtualisation under Vagrant?

 

Also we would appreciate if you provide sample project - it would help us to reproduce and fix the problem.

0

I am developing an rails application the following configuration.

* Windows 7
- RubyMine 2017.3
- VirtualBox 5.2.4
- Vagrant 2.0.1
* Ubuntu 16.04 on Vagrant
- docker 17.12.0-ce
- docker-composer 1.18.0
* Docker instance on Ubuntu
- image ruby:2.4.2-slim

Also I uploaded sample project named "rails-docker-compose.zip" on "JetBrains Uploads". I hope this file can be downloaded.

I configured RubyMine connects to docker daemon inside Ubuntu via the tcp socket.
After docker-compose upped, then a remote Ruby interpreter is configured working via docker-composer.

On the above environment, RubyMine embbeded default "Ruby arguments" such as "-e $$stdout.sync...".
I think this behavior leads the error such as first post.
For example, "Tools > Bunldler > Install" is not worked because I can't remove "Ruby arguments".
However, "Tools > Run IRB Console..." is worked fine without "Ruby arguments".

0

Hello,

could you please try removing "-e $$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift)" options from the default Run configuration (so that they aren't created).

0

I removed the options "-e $$..." according to your suggestion, then RubyMine could not run "Tools > Bunldler > Install".by same error.
With removing the option, all other command such as "Rails", "Rspec" and etc can run.

0

Please sign in to leave a comment.