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

Failed to build gem native extension #585

Closed
Boztown opened this issue May 2, 2014 · 2 comments
Closed

Failed to build gem native extension #585

Boztown opened this issue May 2, 2014 · 2 comments

Comments

@Boztown
Copy link

Boztown commented May 2, 2014

Foward: I solved this. Just want to document it for you.

I switched from RVM to RBENV. I tried to run "bundle" on a project and got this:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/ryanbosinger/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb 
/Users/ryanbosinger/.rbenv/versions/2.0.0-p353/bin/ruby: invalid option -P  (-h will show valid options) (RuntimeError)

It turns out the problem was that my app folder was in a directory called "Local Projects". The space threw it off and I think that's where the -P option was coming from (the start of "Projects").

This is on MacOS 10.9. I'm not sure if it's an rbenv problem, a bundler problem or just a system thing. The directory name wasn't an issue with my RVM set-up though.

@mislav
Copy link
Member

mislav commented May 3, 2014

Might be an rbenv bug with failing to escape paths with spaces somewhere.

When you ran bundle install, did you install into the project's directory (with --standalone or --path=vendor/bundle), or you did a default bundle install which installs into system gems (for that Ruby version)?

@mislav
Copy link
Member

mislav commented Oct 12, 2014

Possible cause: rubygems/rubygems#523

The workaround is to avoid installing gems in paths that have spaces for now.

@mislav mislav closed this as completed Oct 12, 2014
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

2 participants