Fresh install on Mavericks

Hey,

I had Middle man working great on mountain lion OSX. But no such luck with my new MacBook Pro running Mavericks. I’ve read a few blog post on what to install or different combinations of issues, but nothing from ground up. So far I only have what looks to be ruby 2.0.

-ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

But I also get: bundle show
ERROR: RVM Ruby not used, run rvm use 2.0.0 first.

So if anyone has successfully gotten MiddleMan to install on Mavericks 10.9.2 It would be awesome if we could post a step by step.

LOG for sudo gem install middleman:

sudo gem install middleman
Password:
Building native extensions.  This could take a while…
ERROR:  Error installing middleman:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h… no
checking for ffi.h in /usr/local/include,/usr/include/ffi… yes
checking for ffi_call() in -lffi… yes
checking for ffi_prep_closure()… yes
checking for ffi_raw_call()… no
checking for rb_thread_blocking_region()… yes
checking for rb_thread_call_with_gvl()… yes
checking for rb_thread_call_without_gvl()… yes
checking for ffi_prep_cif_var()… no
creating extconf.h
creating Makefile

make “DESTDIR=” clean

make “DESTDIR=”
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:303:5: warning: implicit declaration of function ‘rb_thread_call_without_gvl’ is invalid in C99 [-Wimplicit-function-declaration]
    rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL);
    ^
./Thread.h:78:39: note: expanded from macro ‘rbffi_thread_blocking_region’

define rbffi_thread_blocking_region rb_thread_call_without_gvl

^
1 warning generated.
compiling ClosurePool.c
compiling DataConverter.c
DataConverter.c:43:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
Function.c:479:33: warning: incompatible pointer types passing ‘VALUE (void *)’ to parameter of type ‘void ()(void *)’ [-Wincompatible-pointer-types]
        rb_thread_call_with_gvl(callback_with_gvl, &cb);
                                ^~~~~~~~~~~~~~~~~
Function.c:102:46: note: passing argument to parameter ‘func’ here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
                                            ^
Function.c:563:9: warning: implicit declaration of function ‘rb_thread_call_without_gvl’ is invalid in C99 [-Wimplicit-function-declaration]
        rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
        ^
Function.c:738:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
3 warnings generated.
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
linking shared-object ffi_c.bundle
clang: error: unknown argument: ‘-multiply_definedsuppress’ [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [ffi_c.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.3/gem_make.out

Thanks,
Jon

give this a shot

  1. install ruby 1.9.3 via rvm
  2. set default ruby to 1.9.3
  3. install middleman
  4. try create a new fresh middleman project
  5. run your project
  6. if it didn’t work try this $ bundle exec middleman

hopfully that will do it other wise keep looking online I’m sure you can fix it

Thanks,

But I think 1. is where I started to get stuck last time, looks like there is no binary rubies for 10.9.

sudo rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p545.
Continuing with compilation. Please read ‘rvm help mount’ to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system…
Error running ‘requirements_osx_port_update_system ruby-1.9.3-p545’,
showing last 15 lines of /Users/jonv/.rvm/log/1395254678_ruby-1.9.3-p545/update_system.log
checking for xcode-select… /usr/bin/xcode-select
checking Mac OS X version… 10.9.2
checking Xcode location… /Library/Developer/CommandLineTools
checking for gcc… /usr/bin/llvm-gcc-4.2
checking whether the C compiler works… no
configure: error: in /opt/local/var/macports/sources/rsync.macports.org/release/base': configure: error: C compiler cannot create executables See config.log’ for more details
shell command “cd /opt/local/var/macports/sources/rsync.macports.org/release/base && CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install” returned error 77
DEBUG: Error installing new MacPorts base: shell command failed (see log for details)
while executing
“macports::selfupdate [array get global_options] base_updated”
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)
++ return 1
++ return 1
Requirements installation failed with status: 1.

download xcode https://developer.apple.com/xcode/downloads/ its about 2GB
then install macports
and give it another shot :smile:
i know its frustrating but once you set it up right everything going to be smooth after that

Process to install I got from multiple sources for everyones SA

-sudo xcode-select --install
-install xcode from app store (takes awhile, 2.8 gigs)
-run app and let it install components

-Installed macports https://www.macports.org/guide/#installing.macports.binary

  • sudo rvm install 1.9.3

  • rvm use ruby-1.9.3 --default

-sudo gem install middleman
-sudo gem install middleman-more
-not sure if this was needed

-sudo bundle install

then bundle exec middleman server worked!

good to hear :smile:

I got middleman to compile on Mavericks by running :

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install middleman