Happy new year!
TKXXS provides a very simple and very easy to use GUI (graphical user
interface) for Ruby. It gives you a persistent output window and popping
up (modal) dialogs for input. For a screenshot, see:
Tested on Windows, only.
Homepage: GitHub - Axel2/tkxxs: TKXXS provides a very simple and very easy to use GUI for Ruby
Prerequisites:
Ruby 1.8.7 or 1.9.x with TK (e.g. RubyInstaller)
Install:
gem install Platform
gem install tkxxs
Based on TK.
Axel
I was trying out the library in ruby. It had an issue of missing ‘tk’
library. And i found this error:
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- tk (LoadError) from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require’
from /usr/local/lib/ruby/gems/1.9.1/gems/tkxxs-0.1.1/lib/tkxxs.rb:14:in
<top (required)>' from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in
require’
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in rescue in require' from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in
require’
from small_example.rb:2:in `’
http://csnipp.com/coderhs/1912816
I believe my system as tcl/tk. Am i missing anything else? Can you
suggest
me some command to verify my TCL/TK installation.
Oh sorry for not including much information in my previous mail.
I was trying out the library in linux (ubunutu).
Ruby version: ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
Hi,
I believe my system as tcl/tk. Am i missing anything else? Can you
suggest
me some command to verify my TCL/TK installation.
- Which OS (Windows xxx, Linux, …) are you using?
- Which Ruby-Version do you use?
- Did you use RubyInstaller? (Downloads)
** If yes, did you use the exe-Installer (As opposed to 7z)? Then you
must have clicked something like " …activate tcltk… "
** Do you have this directory: <your_ruby_path>\lib\ruby\1.9.1\tk
** Do you have this file:
<your_ruby_path>\lib\ruby\1.9.1\i386-mingw32\tcltklib.so
Maybe you must replace “1.9.1” to “1.8.7” or whatever you use.
BTW, it is easy to install Ruby with tcltk support using the
RubyInstaller.
Axel
I was trying out the library in linux (ubunutu).
Ruby version: ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
I tested it only on Windows, but I’m not aware of things which are
OS-dependent (but I wrote the code in 2010, maybe I overlooked
something.)
This line of your error-message is quite obvious:
“…cannot load such file – tk (LoadError)…”
Seems, that you have not tk.
You can create a file tmp001.rb with the following content.
require ‘tk’
require ‘tkextlib/tile’
and run it with your ruby. Which message do you get?
Axel
Yes, it seems the tk library is missing. But i tried gem install tk, but
it
said there no such file.
hsps@answer:~/sandbox/tkxxs/samples$ ruby test.rb
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- tk (LoadError) from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require’
from test.rb:1:in `’
hsps@answer:~/sandbox/tkxxs/samples$ sudo gem install tk
[sudo] password for hsps:
ERROR: Could not find a valid gem ‘tk’ (>= 0) in any repository
http://csnipp.com/coderhs/1912818
I think I found an answer to your question:
“…On Ubuntu, there is a libtcltk-ruby package…”
I found it here: https://www.ruby-forum.com/topic/441820
Axel
A better first command could be:
gem q -r -n tk
-> q(uery) r(emote) n(ame matches) tk
But right, this doesn’t give a tk-gem.
I don’t know much about linux, but does your Ubuntu have something like
a “package manager” for software? Does this show tk for ruby?
Axel