Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Joshua Welt
Joshua Welt
4,589 Points

Development tools cant be found & Configuration Issues

Hello I am trying to install Jekyll and I have scoured the internet for solutions but not made much of a dent. I have the latest version of ruby installed along with homebrew and the developer tools. When in try to install the xcode via "xcode-select --install" I receive the following even though my path is to "/Applications/Xcode.app/Contents/Developer"

xcode-select: Error: unknown command option '--install'.

xcode-select: Report or change the path to the active
              Xcode installation for this machine.

Usage: xcode-select --print-path
           Prints the path of the active Xcode folder
   or: xcode-select --switch <xcode_path>
           Sets the path for the active Xcode folder
   or: xcode-select --version
           Prints the version of xcode-select

When I try to install Jekyll or anything similar I receive:

new-host:~ jameswaltz$ gem install jekyll
Building native extensions.  This could take a while...
/Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.
 /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/bin/ruby -r ./siteconf20140807-99237-l32ov4.rb extconf.rb
/Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1523: warning: Insecure world writable dir /usr/local in PATH, mode 040777
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/jameswaltz/.rvm/rubies/ruby-2.1.2/bin/ruby
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
/Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
    from /Users/jameswaltz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header'
    from extconf.rb:16:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/jameswaltz/.rvm/gems/ruby-2.1.2/gems/ffi-1.9.3 for inspection.
Results logged to /Users/jameswaltz/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/ffi-1.9.3/gem_make.out

Thanks for any help!