I install a Ruby version from within Cygwin. 1) How do I use
Interreactive ruby from Cygwin? 2) How do I query Ruby from Cygwin? 3)
Which text editor do you guys prefer when working under Cygwin?
I install a Ruby version from within Cygwin. 1) How do I use
Interreactive ruby from Cygwin? 2) How do I query Ruby from Cygwin? 3)
Which text editor do you guys prefer when working under Cygwin?
Thanks,
Li
Well, before the anti-cygwin folks jump in here
1. Just open a Cygwin command window (or an xterm) and type "irb" at the prompt.
2. I'm not sure what you mean by "query Ruby"?
3. Cygwin has vim, emacs and xemacs. I prefer vim. If you have Cygwin X, you also will have "gvim".
Other notes:
1. If you download and install the "gem" tarball, RubyGems works as advertised.
2. I have not tried the Cygwin compile/link toolchain with C extensions, so I don't know if that works or not. That's the main reason people don't like the Cygwin port -- it's confusing for all except "pure Ruby" to have to deal with three different compilers -- Microsoft's, "mingw" and Cygwin's.
If you need to deal with non-Ruby extensions, my recommendation would be to get the one-click installer and use the precompiled Gems, rather than trying to mess with Cygwin. But if you're dealing with pure Ruby, Cygwin is fine.
3. Cygwin has vim, emacs and xemacs. I prefer vim. If you have Cygwin X,
you also will have "gvim".
Of which all three (four?) exist and work under Windows natively, so you
can spare yourself an epicycle there unless you're sshing into the
Cygwin setup.
3. Cygwin has vim, emacs and xemacs. I prefer vim. If you have Cygwin X,
you also will have "gvim".
Of which all three (four?) exist and work under Windows natively, so you
can spare yourself an epicycle there unless you're sshing into the
Cygwin setup.
David Vallner
I will add, as a happy GVim user, that the Windows native version is *much* more attractive than either the Cygwin X-Windows "gvim" or its Linux cousin/ancestor. When I'm on Windows, I use Windows GVim, and when I'm on Linux or Cygwin, I use the regular "vim" from an XTerm or other command shell window.
I never bothered to learn either emacs or xemacs, so I can't comment on their use, either native Windows or Cygwin/Linux.
I will add, as a happy GVim user, that the Windows native version is
*much* more attractive than either the Cygwin X-Windows "gvim" or its
Linux cousin/ancestor. When I'm on Windows, I use Windows GVim
How do you run a Ruby script using Windows GVim? What I do is to write
a script with GVim, save it, then open a window prompt, CD to the folder
containing the script, and run it with "ruby test1.rb" or "test1.rb". I
cannot find a shortcut (for example, just press F5 key or other keys)to
run the script directly from GVim.
(Assuming that the shell you are using is bash, which, AFAIK is the
default shell in cygwin:) Put the unset command in the .bash_profile
file in your home directory. If you need more info. about this, try the
cygwin docs and/or ask some more questions in an appropriate usenet group.
(This group is probably appropriate, but there may be better one - with
more cygwin experts.)
···
On 2006-12-23, Li Chen <chen_li3@yahoo.com> wrote:
M. Edward (Ed) Borasky wrote:
Ah ... type "unset RUBYOPT" at the command prompt and try it again
It works. But what annoys me is that I have to type this commmand every
time when I start a new window. Is there another way to avoid this
situation?
How do you run a Ruby script using Windows GVim? What I do is to write a script with GVim, save it, then open a window prompt, CD to the folder containing the script, and run it with "ruby test1.rb" or "test1.rb". I cannot find a shortcut (for example, just press F5 key or other keys)to run the script directly from GVim.
Hi Li,
on RubyGarden there should be many infos about using Vim for Ruby programming. You could start here:
(Assuming that the shell you are using is bash, which, AFAIK is the
default shell in cygwin:) Put the unset command in the .bash_profile
file in your home directory. If you need more info. about this, try the
cygwin docs and/or ask some more questions in an appropriate usenet
group.
(This group is probably appropriate, but there may be better one - with
more cygwin experts.)
I search google and find out how to avoid it by deleting RUBYOPT from
path within enviroment variables under XP.
On 2006-12-23, Li Chen <chen_li3@yahoo.com> wrote:
Jim Cochrane wrote:
(Assuming that the shell you are using is bash, which, AFAIK is the
default shell in cygwin:) Put the unset command in the .bash_profile
file in your home directory. If you need more info. about this, try the
cygwin docs and/or ask some more questions in an appropriate usenet
group.
(This group is probably appropriate, but there may be better one - with
more cygwin experts.)
I search google and find out how to avoid it by deleting RUBYOPT from
path within enviroment variables under XP.