Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pact-node's ruby bindings don't work if the project name has spaces #247

Closed
christopher-francisco opened this issue Jun 5, 2018 · 5 comments

Comments

@christopher-francisco
Copy link

Software versions

  • OS: macOS 10.13.3, Centos 7 (probably)
  • Consumer Pact library: 5.9.1
  • Node Version: 8

Expected behaviour

It shouldn't matter whether the directory name has or hasn't spaces on its name.

Actual behaviour

When creating the mock server, it somehow split the project path where spaces exist: /var/lib/jenkins/workspace/My Cool App/, and attempts to run Cool as a command. It then, of course, fails saying

/node_modules/@pact-foundation/pact-node/standalone/darwin-1.43.1/lib/ruby/bin/ruby: line 14: Cool: command not found

Steps to reproduce

  1. Change the name of your app to something with spaces (if possible with 3 words), like: my-cool-app to My Cool App.
  2. Run the PactJS tests.
@christopher-francisco christopher-francisco changed the title Is Pact-JS dependant on docker installed in the host machine? Pact-JS doesn't work if the project path has blank spaces Jun 5, 2018
@christopher-francisco christopher-francisco changed the title Pact-JS doesn't work if the project path has blank spaces Pact-JS doesn't work if the project name has spaces Jun 5, 2018
@mefellows
Copy link
Member

mefellows commented Jun 5, 2018

Thanks @chris-fa, I'll take a look.

cc: @mboudreau @bethesque . Did we do something recently with fixing spaces on Windows, and could this have had an impact?

@christopher-francisco
Copy link
Author

@mefellows Btw, this is not happening on Windows, it's on a Jenkins server running in some linux distro (prolly Centos but I don't have confirmation yet, the owner hasn't replied with that info).

I was also able to reproduce it on my MacOS

@bethesque
Copy link
Member

I swear we'd fixed all the space issues! They're like whack-a-mole. I'll have a look. I think I'm going to add contraindications for using Pact in the FAQ - 1. you're on windows or 2. your project name has spaces :P

@bethesque
Copy link
Member

I get further if I replace

echo GEM_HOME="$ROOT/lib/ruby/gems/2.2.0"
echo GEM_PATH="$ROOT/lib/ruby/gems/2.2.0"

with

echo GEM_HOME=$(printf %q "$ROOT/lib/ruby/gems/2.2.0")
echo GEM_PATH=$(printf %q "$ROOT/lib/ruby/gems/2.2.0")

in ruby_environment, but then it errors further down.

@TimothyJones TimothyJones transferred this issue from pact-foundation/pact-js Dec 17, 2020
@TimothyJones TimothyJones changed the title Pact-JS doesn't work if the project name has spaces Pact-node's ruby bindings don't work if the project name has spaces Dec 17, 2020
@mefellows
Copy link
Member

Closing as latest version removes Ruby core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants