bundle error on OS X
Asked Answered
S

5

7

This is the error log, when i use bundle install.

I want to construct a blog in Github, so use Octopress, but it was unsuccessful. If you have another method, please tell me, thank you.

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

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lc... yes
creating Makefile

make "DESTDIR="
make: *** No rule to make target `"/Applications/Xcode', needed by `redcloth_attributes.o'.  Stop.


Gem files will remain installed in /var/folders/zb/bxbkz6pd5fscs29zq2hk1b4h0000gn/T/bundler20141230-81071-q2p8fv/RedCloth-4.2.9/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/folders/zb/bxbkz6pd5fscs29zq2hk1b4h0000gn/T/bundler20141230-81071-q2p8fv/RedCloth-4.2.9/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot
continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
Sela answered 30/12, 2014 at 3:39 Comment(4)
Construct a blog in Github ?! Github is not a free hosting for blogs.Rothschild
@Rothschild You can host pages on Github. Read: jekyllrb.com/docs/github-pagesKarakoram
You can host pages like Read Me & change logs, but not a blog.Rothschild
@Rothschild Directly from Github itself: "they’re also a great way to host your Jekyll-powered website for free." You can absolutely host a blog on Github, if you want to.Thematic
R
26

This fixed the issue for me.

xcode-select -s /Library/Developer/CommandLineTools/
Rika answered 25/5, 2020 at 10:52 Comment(3)
This saved me. Looked all over for the answer and it was hiding with no upvotes!Torrance
Glad it helped :)Rika
Worked on Big SurReeder
T
5

It looks like maybe your Mac doesn't have xcode command line tools installed. Try this in the terminal then try bundling again:

xcode-select --install

You will also need to accept the license agreement. I think it asks you automatically now.

Tearjerker answered 30/12, 2014 at 4:25 Comment(0)
M
1

My issue was there is a space in Xcode name

So I rename the "Xcode 13.1" to "Xcode13.1"

Change the developer tools path using xcode-select switch command

sudo xcode-select -s /Applications/Xcode13.1.app/Contents/Developer 
Magenmagena answered 12/11, 2021 at 18:51 Comment(0)
P
1

Occur same issue after run sudo gem install cocoapods on my new m1 macbook pro.

↓This fix issue for me too.

xcode-select --switch /Library/Developer/CommandLineTools/

if you doesn't have CommandLineTools folder, just run xcode-select --install

Puga answered 22/4, 2022 at 10:47 Comment(0)
M
0

1-st idea:

Install (update) ruby:

brew install ruby

And don't forget:

echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

2-nd idea:

Maybe you have to install current (compatible to your XCode) 'Command line tools for XCode'. Google for appropriate Version (if your XCode 11.3 so CommandLineToolsForXcode_11.3).

Mesencephalon answered 31/3, 2020 at 8:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.