Installing VisualRuby on a MAC - ruby

I'm trying to understand how to install visualruby on a MAC. I work in ubuntu, and I've developed install instructions for Ubuntu and Windows, but I don't know the corresponding instructions for the MAC:
http://visualruby.net/Download
I know that you need to install the Glade Interface Designer. This should install the graphics toolkit, gtk2 as well. Visualruby needs gtk2. After that you can install visualruby:
gem install visualruby
My friend told me that it needs to be run in the X11 terminal. I don't understand any of this. I'd like to develop step-by-step instructions for installing it on the MAC that includes the correct version of Glade/Gtk2. I know that visualruby requires Glade version 2.6 thru 2.8. The latest version of Glade uses Gtk3 which isn't good.
EDIT: Visualruby will also require "gtksourceview2" installed (perhaps via homebrew?)
Step-by-step instructions would be greatly appreciated.

I'm the friend referred to above.
I had the best success with QuartzX11.
I installed glade, gtk+ and gtksourceview via homebrew but perhaps that's not the best way.

Related

Class RunLoopModeTracker is implemented in both - Qt

Just to precise I'm a total beginner in this. I check on the internet and it seems that nothing match to this problem.
My goal is to run this github which is a facial recognition program: https://github.com/anisayari/easy_facial_recognition
So here is the error:
Class RunLoopModeTracker is implemented in both
/Users/pierre/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1086267f0)
and /Users/pierre/anaconda3/lib/libQt5Core.5.9.7.dylib (0x122fc0a80).
One of the two will be used. Which one is undefined.
From what I understand, I just have to indicate which one to use but I don't find anything about how to do it. Also, It seems to be a recurrent error on Mac.
I had this error on my Mac too. Apparently opencv's GUI tools were conflicting with the PYQT libraries that were also installed on my system in my anaconda/lib/ folder. So to give opencv just one set of GUI tools and since I wasn't sure what else was using PYQT in my lib, I chose to use the non-GUI version of opencv, aka opencv-python-headless. I previously had opencv-python-headless installed on my system, and maybe the two packages can't co-exist in the new version of OpenCV or with Catalina.
I removed opencv-python
pip uninstall opencv-python
uninstalled and reinstalled the headless version (which has no GUI tools)
pip uninstall opencv-python-headless
pip install opencv-python-headless
I don't know if it was necessary to remove then reinstall the existing headless package, but that's what I did. I wasn't sure that opencv-headless would find the PYQT in my lib but it didn't have any problems.

How to get "WebKit for GTK+3 1.3.7" headers for ubuntu?

i'm trying to compile pidgin on ubuntu (mint 17, actually).
./configure says:
"You must have WebKit for GTK+3 1.3.7 or newer development headers"
but which ubuntu package contains this version?
i have several packages named "webkit" or "gtk", and i tried to locate and install other versions, but couldn't find it.
i downloaded the pidgin and webkit sources, but i don't know how to connect them.
(the pidgin support registration seems offline -> hence, here.)
I have a Debian system but perhaps you can do the same :)
First, see what you get with this command on a terminal:
aptitude search webkit |grep gtk
It will shows you all the packages you can install (or already installed) on your system, linking webkit and gtk.
Then you select the package you need : libwebkitgtk-3.0-dev in your case (on Debian)
Hope this helped, See you !
I don't know if this helps but checkout WebKitGTK+. Also this can help, do you have run
$ Tools/gtk/install-dependencies
or the other commands listed on the page?

Nokogiri for Ruby on WindowsXP: 6 hours of my life gone

I just want to install Nokogiri for Ruby on my Windows XP. The process is apparently so obfuscated and divergent that I have about 50 different tabs and windows open trying to install Libxml, devKit, other versions of what I already have, and so on. Does anybody know the secrets of how to install Nokogiri for Ruby on Windows?
Configuration
On my Windows XP, Version 2002 SP3, I have the following directories:
List item
C:\RailsInstaller\Ruby1.9.3
C:\Ruby200
C:\libxml2-2.9.1
C:\DevKit
C:\Python27
C:\Python33
Both ruby's are installed, I have no idea about the DevKit or the libxml. The libxml2-2.9.1 is some kind of python source, so I thought it would be a great idea to install python, which I know nothing about, and try to compile it; hence the two python folders.
I have
libxml-ruby 2.6.0 [rdoc] [www] - depends on hanna_guado.
Ruby Bindings for LibXML2
libxslt-ruby 1.1.0 [rdoc] [www] - depends on libxml-ruby.
Ruby libxslt bindings
installed on ruby, but when I go to do a "gem install nokogiri" it still gives me a
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb checking for libxml/parser.h... no
----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with
installing dependencies.
I'd strongly recommend looking into the Bitnami one-click Ruby installers. They might work with XP.
Otherwise I'd try running a VM with a small Linux guest system. It would be a lot less pain.
Windows isn't exactly friendly to open-source languages and yours is pretty old. Finding the individual components installed is hard enough without a full installer on a current version of the OS, on an old one it's harder and becomes like herding cats.
OS languages fit Linux nicely, and work pretty well with Mac OS because it's *nix based.
Those are the things I'd try instead of what you are doing.
http://bitnami.com/

Where can I find instructions on how to install Vala on my Mac?

I'm looking into learn the Vala programming language where can I find somewhere to show me how to install it on my Mac?
Another way to install it is using Homebrew.
brew install vala
The advantage of Homebrew over Macports is that it tries to rely as much on what is provided by the native OS as possible without installing any additional duplicate libraries.
A good way to install it is to use MacPorts. MacPorts gives you access to Vala and many of the libraries often used with Vala.
I'd start with MonoDevelop and it's installation instructions. There's a Vala plug-in for it.

Is there an easy way to enable Tk for Ruby in OS X v10.6+?

Starting with Snow Leopard (OS X v10.6) Apple bundles 64-bit ruby by default. Unfortunately, there is no 64-bit Tk bundled, so the following ruby code will fail:
require 'tk'
Is it some easy way to enable Tk for Ruby in Snow Leopard and higher? Like installing 32-bit ruby or whatever. I have tried to recompile Ruby with Tk support but it seems not that easy - tutorials found in google refers to some options in Ruby's ./configure script that don't exists in actual Rby code downloaded from official site :(. I will be glad for any hints - i have a Ruby app with Tk GUI and need to enable my users to use it :)
Tk builds fine in 64-bit mode on OSX, but only if you've got sources from the 8.6 series«ZIP»«TGZ» (still in beta for various reasons, but quite usable). You'll want to ensure you configure with --enable-aqua --enable-64bit of course, but I assume that's pretty much obvious.
(Alas, I can't say how to then integrate the build of Tk with your Ruby installation, though there is some documentation online that seems to be somewhat relevant. I emphasize that I've only googled for it though; on this I don't speak from experience.)
Where was a great improvement over Tk documentation recently. Not they has complete instructions on how to enable Tk for Ruby on OSX 10.6+. This requires ActiveTcl 8.5+ binary distribution and compiling ruby from source. The command i used on OSX 10.7 with XCode 4.2 to compile ruby and replace stock ruby installation (dangerous!):
./configure --prefix=/usr --with-arch=x86_64,i386 --enable-pthread --enable-shared --with-gcc=clang
make
sudo make install

Resources