GTK InitError in Ruby - ruby

Trying to install and get some Ruby gems working on OS X 10.9.5 Mavericks. Currently getting this error, any help? No idea what's going on... Thanks!
.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/gtk2-2.2.2/lib/gtk2.rb:13:in `init': Cannot open display: (Gtk::InitError)

Your problem is here:
gtk2.rb
On (or around) line:
:13:in
Error: Cannot open display:
(Gtk::InitError)
Reason for this error? Most likely the Gtk gem/library is not properly installed, or you are not instantiating the Gtk object properly or both.
You should update your question to include the content of gtk2.rb and we will be able to further assist you.

Ruby/GTK2 requires X Window System. Please install X11.app (XQuartz).
About X11 and OS X
http://support.apple.com/kb/ht5293

Related

How to reinstall system Ruby?

Unfortunately I’ve managed to delete my system Ruby on OS X Yosemite and I'm struggling to re-install it.
I've read through the answers detailed here:
https://superuser.com/a/227653/107432
https://superuser.com/questions/545406/i-deleted-ruby-framework-how-can-i-get-it-back
However, when I use Pacifist to try and bring back Ruby.framework the app just hangs like so:
Are there any other means to get hold of Ruby 2.0 for OS X Yosemite and re-install it? Any help would be much appreciated.
What about reinstalling Yosemite without formatting the hard drive? I'm sure that will fix it without deleting any of your personal files.

Start a terminal in OSX Lion in order to upgrade OS from dock

i want to upgrade my OSX Lion to Mavericks and install from USB dock.
I found this article that explain how to do that but since i am not familiar with OSX i don't know even how to open terminal.
The Terminal is located in /Applications/Utilities/, however do beware that this is a very powerful tool that you shouldn't mess around with too much if you don't know what you are doing. The easiest and recommended way to install Mavericks is still through the App store.

Xcode DMG for Snow Leopard consistently not mounting

I am running Snow Leopard 10.6.8 and attempting to install Xcode 4.2 for Snow Leopard. (This one, the blue download link from the dev center).
However, the DMG always gives this error (not recognised) when I try to open it.
Does anyone have any experience with this problem? It seems odd that all other DMGs should work apart from this one. Could this mean my computer is incompatible with Xcode 4.2? Or, am I downloading the wrong one?
I hope this is an acceptable question for SO, as I hope someone has had and solved this problem. General Googling for an unrecognised DMG has yielded nothing but 'redownload DMG', which I have done three times already.
Many, many thanks.
Despite downloading the DMG three times, I tried in Safari instead of Chrome as I had been doing and it working perfectly.
If anyone else has this similar 'DMG not recognised' error and finds their way here: try another browser.

Mac os x + libunwind

I'm trying to use libunwind on a mac os x. However, the code is not getting any stack frames, while the same code running on a ubuntu box works perfectly fine.
Is there something i'm missing, that i have to do specifically for macs?
If there are better forums to ask such a mac related questions, i'm more than willing to accept suggestions.

ruby 1.9.2 + pcap on Mac OS X

Has anyone been able to successfully use a pcap library for Ruby 1.9.2 (via rvm) on Mac OS X 10.6?
I have tried pcaprub and it seems to not behave well on Mac OS X and the pcap gem isn't compatible with ruby 1.9.2.
There's definitely some problems building the native extension stuff for the pcap gem on ruby 1.9.2 (I'm on patch 180). Mostly you can get it working by changing RUBYSTR(foo)->ptr to RUBYSTR_PTR(foo) -- that's fairly easy to macro away when you see gcc complaining.
The real problem for me is that it's blocking after the initial call in pcap_loop. I initially was able to get it to do the right thing, but it doesn't want to use the correct timeout. If I can get it working right, I'll definitely be pushing changes upstream.
Edit: see my comments here to get it building on 10.6.
Edit2: I've forked ruby-pcap and got it working on ruby 1.9.2 # patch 180 on Mac OS X 10.6.7; I will be submitting a pull request to the gem shortly. In the meantime, you can get it here

Resources