unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* can one run tk/Ruby gui code from an emacs shell with compile?
@ 2005-11-18 17:11 anne001
  2005-11-18 18:18 ` Peter Dyballa
  0 siblings, 1 reply; 17+ messages in thread
From: anne001 @ 2005-11-18 17:11 UTC (permalink / raw)


I have a small test snipet which runs fine from the terminal prompt
(mac os 10.3.5)
but I can't get it to run from emacs. when I try to compile it in emacs
I get the error
message

/usr/lib/ruby/1.6/tk.rb:7:in `require': No such file to load --
tcltklib (LoadError)
	from /usr/lib/ruby/1.6/tk.rb:7
	from dudruby3.rb:1:in `require'
	from dudruby3.rb:1

I asked for help on the ruby language group and someone thought that
> During compilation invoked from emacs?  You need to check that you
> are getting the correct shell and environment [variables] when emacs
> calls out to the shell to do things.

Does someone on this list know about such things? It just seems ruby on
emacs does not find the
library, while ruby at the terminal does. I don't know where the
libraries are or their names, so I can't help my system much. Or could
it be that emacs is a different ruby from the terminal? panther does
come with an older ruby which I don't know how to uninstall.

Here is my test snipet. I am using ruby 1.8.3  which has a
/ext/tcltklib directory in the raw source which comes with a readme
file I cannot interpret.

require 'tk'
root = TkRoot.new
button = TkButton.new(root) {
text "Hello,Anne"
command proc { puts "I said"}
}
button.pack 
Tk.mainloop

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: can one run tk/Ruby gui code from an emacs shell with compile?
@ 2005-11-19 17:19 Anne G
  0 siblings, 0 replies; 17+ messages in thread
From: Anne G @ 2005-11-19 17:19 UTC (permalink / raw)


> > PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/anne:/usr/local/bin:/usr/
> > X11R6/bin
>
> Yes, because PATH still starts with /usr/bin:/bin, so Apple's ruby in
> /usr/bin is found first.
I did not think it mattered since I had taken out the two
ruby 1.6 directories.

I practiced your command on the terminal
echo $PATH
/usr/local/bin:/usr/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin
as you can see, it works and reworks.

in the emacs shell command
echo $SHELL
does give me /bin/bash
but the command export
usr/bin:/bin:/usr/sbin:/sbin:/Users/anne:/usr/local/bin:/usr/X11R6/bin

has no effect.
The beginning is set in etc/profile, but I don't know how to
overide the write protect.

> To create the empty directory: mkdir ~/.MacOSX
>
> Then in Emacs open in that directory (C-x d, position the cursor, f)
> the file (C-x f) environment.plist and insert this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST
1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
         <key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin</string>
</dict>
</plist>


(I removed the paths which I could not find on my computer)

I rebooted the computer, and echo $PATH echoed what I have
just put into environment.plist.

I tried compiling my snipet from emacs, and this time, it
compiled!!!!!!!!!!!!!! I don't know if anything else will be
having trouble finding a path. But this demonstrate for sure
that the problem is the path.

> > I looked in my panther book at all the bash environment
> > variables, but I have no clue as to what to do.  Sorry.

Looking at the dev site, I had no clue this text above in
environment.plist was the code to put in.

I am a little lost. Do I need to report a bug? If so what
information do I need to give as to the fix? The one about
changing the path with environment.plist?

Thank you for getting me through with this

Anne

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-11-20 15:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18 17:11 can one run tk/Ruby gui code from an emacs shell with compile? anne001
2005-11-18 18:18 ` Peter Dyballa
2005-11-18 18:51   ` Anne G
2005-11-18 19:53     ` Peter Dyballa
2005-11-19  0:56       ` Anne G
2005-11-19  9:48         ` Peter Dyballa
2005-11-19 11:32           ` Anne G
2005-11-19 12:18             ` Peter Dyballa
2005-11-19 14:19               ` Anne G
2005-11-19 15:03                 ` Peter Dyballa
2005-11-19 16:47                   ` Success, emacs compiled my snipet Anne G
2005-11-19 19:20                     ` Peter Dyballa
2005-11-20  0:16                       ` can one run tk/Ruby gui code from an emacs shell with compile? Anne G
2005-11-20  1:13                         ` Peter Dyballa
2005-11-20 14:41                           ` Anne G
2005-11-20 15:53                             ` Peter Dyballa
  -- strict thread matches above, loose matches on Subject: below --
2005-11-19 17:19 Anne G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).