You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error running rake ember:install when nodejs is installed in path with spaces #405
I got this error when running rake ember:install on Windows
ERROR: Failed command: `C:\Program Files\nodejs\npm.CMD prune && C:\Program Files\nodejs\npm.CMD install`
OUTPUT:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Is there any work around to escape the space in nodejs path?
DISCLAIMER:: Advice from a newb:
Hey there folks, found this problem and tried to work around it by using subst command to associate my NPM folder with a drive letter. Using the escape characters above did not help, unfortunately. For those unfamiliar, I used the subst command in terminal (As Admin) from my NPM directory (C:\Program Files\nodejs) and mounted the path to my N drive label:
subst n: .
The syntax there is [cmd] [drive label] [directory to mount], note the last one is a period to indicate the current path. If that doesn't work, because there can be issues with subst not wanting to actually create a drive your system can use, you can always go through Disk Management to shrink your C drive, mount a new drive to your nodejs folder by removing its contents, mounting the drive, then replacing them. I highly recommend a restart after this.
If your ember install seems to spin forever after this, then you still have issues. Running this code seems to work for me, but I don't get a nice green print that says everything went nicely:
bundle exec rake ember:install --trace
And I still see this when running my rails server:
No 'ember-cli' executable found for 'frontend'
I have confirmed I am using the latest gem, and can see that the code in path_set.rb, line 40 is:
root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
I have read and followed instructions related to #392, and what playing around with path_set.rb can show me is that the path to my ember file is right, but path.executable? returns false. I've made sure the permissions of the file are set to allow reading and executing.
EDIT:: Confirmed problem in the rake:install. If I don't cancel it out it hangs for 30+ minutes with no cpu usage, cmd looks like this:
Prior to edit I had been cancelling out of impatience and then running it again, only to have it quickly decide it had run just fine without printing any kind of success line.
EDIT2:: That 30+ minutes turned into a weekend, that command is definitely the problem that hangs windows dev right now.
I played a long time trying to make this work on a windows box, and If you can install nodejs to a folder path without any spaces it clears up this issue as far as I know. Despite that, I ran into more issues and finally installed Virtual Box running Ubuntu, it makes web development a million times easier.
rake ember:install
rake aborted!
Errno::ENOENT: No such file or directory - /Users/mapcuser/Projects/Development
/Users/mapcuser/.rvm/gems/ruby-2.3.1@dd/bundler/gems/ember-cli-rails-95299d73262a/lib/ember_cli/runner.rb:13:in `run'
# omitted for brevity
/Users/mapcuser/.rvm/gems/ruby-2.3.1@dd/bundler/gems/ember-cli-rails-95299d73262a/lib/tasks/ember-cli.rake:14:in `block (2 levels) in <top (required)>'
/Users/mapcuser/.rvm/gems/ruby-2.3.1@dd/bin/ruby_executable_hooks:15:in `eval'
/Users/mapcuser/.rvm/gems/ruby-2.3.1@dd/bin/ruby_executable_hooks:15:in `<main>'
The app is nested several levels deep in a directory named Development Database, but the gem thinks it's in Development because of the space.
When I run my webserver and go to where the app is mounted, I see:
:searchapp has failed to build: sh: /Users/myusername/Projects/Development: No such file or directory
When I specify the absolute path and include a '' before the space, it tells me that directory does not exist, but when I copy and paste that absolute path into my shell and cd into it, it exists.
Activity
seanpdoyle commentedon Feb 26, 2016
@wrystr thanks for bringing this to our attention.
Unfortunately, this project has numerous issues when running on Windows.
There is a standing PR (#291) to run the test suite on AppVeyor so that we can start to address bugs like this.
Unfortunately, I don't have access to a Windows machine to carry that PR across the finish line.
As a quick fix, could you try configuring your application with
npm_pathset to your current path, with the spaces escaped by\\?:Sorry if this doesn't work, I don't have much experience with Windows' shell.
aaronjmccoy commentedon Mar 4, 2016
DISCLAIMER:: Advice from a newb:
Hey there folks, found this problem and tried to work around it by using subst command to associate my NPM folder with a drive letter. Using the escape characters above did not help, unfortunately. For those unfamiliar, I used the subst command in terminal (As Admin) from my NPM directory (C:\Program Files\nodejs) and mounted the path to my N drive label:
subst n: .The syntax there is [cmd] [drive label] [directory to mount], note the last one is a period to indicate the current path. If that doesn't work, because there can be issues with subst not wanting to actually create a drive your system can use, you can always go through Disk Management to shrink your C drive, mount a new drive to your nodejs folder by removing its contents, mounting the drive, then replacing them. I highly recommend a restart after this.
If your ember install seems to spin forever after this, then you still have issues. Running this code seems to work for me, but I don't get a nice green print that says everything went nicely:
bundle exec rake ember:install --traceAnd I still see this when running my rails server:
No 'ember-cli' executable found for 'frontend'I have confirmed I am using the latest gem, and can see that the code in path_set.rb, line 40 is:
root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|I have read and followed instructions related to #392, and what playing around with path_set.rb can show me is that the path to my ember file is right, but
path.executable?returns false. I've made sure the permissions of the file are set to allow reading and executing.EDIT:: Confirmed problem in the rake:install. If I don't cancel it out it hangs for 30+ minutes with no cpu usage, cmd looks like this:
C:\Users\amccoy\Desktop\InventoryMadness\frontend>rake ember:install --trace (in C:/Users/amccoy/Desktop/InventoryMadness) ** Invoke ember:install (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute ember:installPrior to edit I had been cancelling out of impatience and then running it again, only to have it quickly decide it had run just fine without printing any kind of success line.
EDIT2:: That 30+ minutes turned into a weekend, that command is definitely the problem that hangs windows dev right now.
Agiledevers commentedon Apr 13, 2016
Hello,
I am having the exact same issue on a rails-ember-cli-rails app installed on a windows machine. Do you have any update on this @Herbo4 ? Thks!
aaronjmccoy commentedon Apr 14, 2016
I played a long time trying to make this work on a windows box, and If you can install nodejs to a folder path without any spaces it clears up this issue as far as I know. Despite that, I ran into more issues and finally installed Virtual Box running Ubuntu, it makes web development a million times easier.
jmperez127 commentedon May 5, 2016
This is a temporal fix. You should consider working on vagrant, but if you decide to go with windows, you can try this.
if for some reason you have node installed in C:\Program Files (x86), you should use "C:\Progra~2\nodejs\npm.cmd" instead.
beechnut commentedon May 10, 2016
I'm having a similar issue on OS X.
The app is nested several levels deep in a directory named
Development Database, but the gem thinks it's inDevelopmentbecause of the space.When I run my webserver and go to where the app is mounted, I see:
When I specify the absolute path and include a '' before the space, it tells me that directory does not exist, but when I copy and paste that absolute path into my shell and
cdinto it, it exists.jakeonfire commentedon May 25, 2017
^ The same thing happens on Jenkins (on Ubuntu) when the build/project name (and thus the working directory) has a space...