-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Railsties yarn.rake fails when the Rails.root folder name has spaces in its name. #40783
Comments
Thanks for your report, I created #40785 – can you see if this fixes it for you? NB: I think this error was present before already, because the next |
Yeah indeed, that is the difference: system("not present")
# => nil
`not present`
# Traceback (most recent call last):
# 2: from (irb):4
# 1: from (irb):4:in ``'
# Errno::ENOENT (No such file or directory - not) So before it silently wasn't doing anything at all in such cases and now it hard fails because of the different way to execute yarn. |
Yes. It does fix it. Thanks. system("not present") and |
👍 so when it is merged it will actually run |
No sure what you mean. I was calling Rake::Task["assets:precompile"].invoke and this was calling yarn.rake. We have all the project builds do a
and they then continue. Why do you call yarn install in a yarn.rake on an asset precompile? Why should "rake assets:precompile" call "yarn install" and "rake db:migrate" will not call "bundle install"? |
I can't reason about the logic, but look at: rails/railties/lib/rails/tasks/yarn.rake Lines 23 to 26 in f4265ae
This makes |
Ok. Thanks. I was sometimes wondering looking at the logs why yarn install runя two times, but I never got to the point to look at it further. |
Steps to reproduce
Create a rails folder that has spaces in its name.
Example is "is-commands Build and Release/workspace"
The folder in question is "/var/lib/jenkins/jobs/is-commands Build and Release/workspace" and the rails project is located in it.
Build a rake task that calls:
Expected behavior
Yarn completes successfully. Precompilation completes successfully.
Actual behavior
System configuration
Rails version: 6.1
Ruby version: 2.6.5
Update 1
Yesterday this was working with
Today it is not working with
About 150 projects have failed because of this. Trying to understand it further.
Update 2
The problem is in
You can not call
#{Rails.root}/bin/yarn --version
when there is a space in the name of the folderThis was introduce about 2 days ago with bd4d8fd
I am not sure If I should tag the people that have made the commit (please tell me if I should not)
@rafaelfranca @doits
I do have yarn in
I could prepare a PR if you want.
The text was updated successfully, but these errors were encountered: