krainboltgreene / termnote

Keynotes in your flippin' TERMINAL!
http://krainboltgreene.github.com/termnote
MIT License
273 stars 22 forks source link

Installing on OSX #6

Open jamestomasino opened 11 years ago

jamestomasino commented 11 years ago

I've been trying to install this on OSX and I keep running into issues. Below are my attempts and results. Do you have any suggestions? I'd love to use this project.

Attempt #1:

$ sudo gem install termnote

Building native extensions. This could take a while... ERROR: Error installing termnote: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb creating Makefile

make xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -c posix-spawn.c sh: /Developer/usr/bin/xcodebuild: No such file or directory /Developer/usr/bin/xcodebuild fails with 32512 - Unknown error: 32512 make: *\ [posix-spawn.o] Error 69

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/posix-spawn-0.3.6 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/posix-spawn-0.3.6/ext/gem_make.out

Attempt #2:

I created a Gemfile to see if it was a dependency issue.

$ bundle install

Fetching gem metadata from http://rubygems.org/.... Using colored (1.2) Installing posix-spawn (0.3.6) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb creating Makefile

make xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -c posix-spawn.c sh: /Developer/usr/bin/xcodebuild: No such file or directory /Developer/usr/bin/xcodebuild fails with 32512 - Unknown error: 32512 make: *\ [posix-spawn.o] Error 69

Gem files will remain installed in /Users/james.tomasino/.bundler/tmp/71344/gems/posix-spawn-0.3.6 for inspection. Results logged to /Users/james.tomasino/.bundler/tmp/71344/gems/posix-spawn-0.3.6/ext/gem_make.out An error occurred while installing posix-spawn (0.3.6), and Bundler cannot continue. Make sure that gem install posix-spawn -v '0.3.6' succeeds before bundling.

jamestomasino commented 11 years ago

May be related:

I did a which xcodebuild and it returned: /usr/bin/xcodebuild

Perhaps the pathing your using could do a lookup instead of hardcoding this location?

krainboltgreene commented 11 years ago

Hey @jamestomasino, sorry this took me so long to get around to. So it looks like you're using the native version of Ruby on Mac OSX which is 1.8. Even if you got past this native ext. stuff you wouldn't be able to run this.

I hadn't thought about people using this without real ruby setups.

Ultimately though your install is failing because pygments.rb, the gem I use to syntax highlight code, requires a c-ext gem called posix-spawn.

I'll see if I can't come up with an alternative

jamestomasino commented 11 years ago

Ahha! I'm obviously not a big ruby guy, so that's very enlightening. Is there a different ruby install I can do on Mac to replace the native one and move forward, or should I wait for patches to the project?

krainboltgreene commented 11 years ago

I believe this to be fixed in 1.5.1. Give it a shot and let me know.

jamestomasino commented 11 years ago

We are certainly getting closer. The install of the gem worked perfectly. It installed smart_colored-1.1.1 and termnote-1.5.1.

I then downloaded the project, popped into the example folder, and attempted to run termnote slideshow1.yaml. Here's what came back:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- io/console (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/termnote-1.5.1/lib/termnote.rb:1
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/termnote-1.5.1/bin/termnote:3
from /usr/bin/termnote:19:in `load'
from /usr/bin/termnote:19
krainboltgreene commented 11 years ago

noooooo. Silly 1.8. Ok, next release tonight will have 1.8 compat, promise.

jamestomasino commented 11 years ago

You're a rockstar. Thanks for working so quickly on this. I love the concept and I can't wait to dive in and use it way too much.

krainboltgreene commented 11 years ago

Ok, I've got a fix in and I'm going to release it around lunch time. You'll have to update to 2.0.0.

jamestomasino commented 11 years ago

I updated to 2.0.0. Here's the latest error when running termnote slideshow1.yaml (using your file in the example folder):

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- io/console (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from /Library/Ruby/Gems/1.8/gems/termnote-2.0.0/lib/termnote.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from /Library/Ruby/Gems/1.8/gems/termnote-2.0.0/bin/termnote:3
from /usr/bin/termnote:23:in `load'
from /usr/bin/termnote:23

It appears like the error is very similar still. Just at line number change? Maybe it's not leveraging the change?

krainboltgreene commented 11 years ago

Alright, so it looks like io/console, which got put in 1.9 STDLIB, doesnt work in 1.8.7.

What I'll do is switch out how I get keystrokes, which means more code tonight and a release tomorrow.

krainboltgreene commented 11 years ago

Thanks for being patient by the way.

jamestomasino commented 11 years ago

Happy to be patient for a cool project.