I need the Gem TK on my Mac with Mojave. I followed a tutorial that worked for a friend, but she can't explain how she did it anymore.
I installed:
- The CommandLine tool
- homebrew rbenv and ruby-build
- Ruby 2.6.2, which is used globally. (ruby -v => 2.6.2)
- rbenv init into the shell
- rbenv-doctor
But I can't get any further with:
$ bundle install
Neither using Gemfile:
source 'https://rubygems.org' do
gem 'tk'
end
nor without it:
$ sudo gem install tk
works. I get:
Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.
I can't find X11 libraries. So I can't make tcltklib.so, which is required by Ruby/Tk. So I installed ActiveTCL and did:
$ sudo gem install tk
When I start the program, the toolkit opens, and my classes are visible, but I can't execute any methods. Everything is black. With my setup in Windwows, my programm runs perfectly.
Do you know why my toolkit doesn't run flawless?