K
Kent Loobey
I am brand new to Ruby. I am trying to get my system set up so that I can use
Tk in Ruby.
I get an error when I try to use Tk:
kent@moe:~/projects/ruby/t1$ ./t1.rb
/t1.rb:3:in `require': No such file to load -- tk (LoadError)
from ./t1.rb:3
kent@moe:~/projects/ruby/t1$ cat t1.rb
#!/usr/bin/ruby
require 'tk'
root = TkRoot.new { title "Ex1" }
TkLabel.new(root) {
text 'Hello, World!'
pack { padx 15; pady 15; side 'left' }
}
Tk.mainloopkent@moe:~/projects/ruby/t1$
I am not sure how I get what ever Ruby is looking for. I have tk8.4 on my
system.
Tk in Ruby.
I get an error when I try to use Tk:
kent@moe:~/projects/ruby/t1$ ./t1.rb
/t1.rb:3:in `require': No such file to load -- tk (LoadError)
from ./t1.rb:3
kent@moe:~/projects/ruby/t1$ cat t1.rb
#!/usr/bin/ruby
require 'tk'
root = TkRoot.new { title "Ex1" }
TkLabel.new(root) {
text 'Hello, World!'
pack { padx 15; pady 15; side 'left' }
}
Tk.mainloopkent@moe:~/projects/ruby/t1$
I am not sure how I get what ever Ruby is looking for. I have tk8.4 on my
system.