http_parser.rb: Installation error when installing on a path with spaces using Bundler
Steps:
- create a folder with spaces on its path (i.e:
~/http parser/) - add
http_parser.rbto aGemfile:
source 'https://rubygems.org'
gem 'http_parser.rb'
- run
bundle install --path _vendor
What happens:
Fetching gem metadata from https://rubygems.org/.
Fetching version metadata from https://rubygems.org/
Resolving dependencies...
Installing http_parser.rb 0.6.0 with native extensions
Using bundler 1.13.2
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/ale/Desktop/tmp/http parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20161005-24321-171301n.rb extconf.rb
creating Makefile
current directory: /Users/ale/Desktop/tmp/http parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
current directory: /Users/ale/Desktop/tmp/http parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
compiling ruby_http_parser.c
clang: error: no such file or directory: 'parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser'
make: *** [ruby_http_parser.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/ale/Desktop/tmp/http parser/_vendor/gems/http_parser.rb-0.6.0 for
inspection.
Results logged to /Users/ale/Desktop/tmp/http
parser/_vendor/extensions/universal-darwin-16/2.0.0/http_parser.rb-0.6.0/gem_make.out
An error occurred while installing http_parser.rb (0.6.0), and Bundler cannot continue.
Make sure that `gem install http_parser.rb -v '0.6.0'` succeeds before bundling.
Renaming the folder to http_parser fixes the issue.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 12
- Comments: 18 (1 by maintainers)
I had the same problem and I solved it by removing a space in the name of a folder from my personal path
That helped. It is such a disgrace though.
This is still happening, I lost 3 hours today because of this bug. Please fix.
Hi all, Mac OSX user here where my folders were syncing with iCloud (and had a hard coded space in folder I couldn’t change). My solution:
Add to Gemfile:
gem 'http_parser.rb', git: "https://github.com/tmm1/http_parser.rb.git"The one above using ssh:// didn’t work, this one did.
@silambarasanmkce
If your project’s parent directory name contains spaces, this error will occur.
Please change the name of the directory and try again.
Another workaround:
https://rubygems.org/gems/http_parser.rb is only up to date on 0.6.0 the latest version is 0.6.1 which fixes this issue.
Adding this line to
Gemfileresolves the issue for me.gem 'http_parser.rb', git: "git@github.com:tmm1/http_parser.rb.git"It still isn’t fixed… I’m facing the exact same problems… please modify the default Makefile and put quotations in
-ID:“<path where the bundle install is being run>”
The path mentioned above will be the one with spaces. Quotations are important and will not cause the error.
Please fix asap!!
I’m getting the following error when trying to run
gem install jekyll, not sure how to fix or what to change if related:I don’t think any of the above fixes it for me.
I’ve released v0.6.1. v0.6.1 will fix this issue.
It’s not the first time I get errors with folder names in Ruby (and also, the
error: no such file or directory: 'parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser'bit on the logs was a bit suspicious, since the working dir should be/Users/ale/Desktop/tmp/http parser/_vendor/gems/http_parser.rb-0.6.0/ext/ruby_http_parser: )(not sure if the project is even alive, but I thought I’d file)