Yes, it can be frustrating.  I've been using vi since 1978 and emacs
since 1979.  My experience includes using sed to diddle system files
on an init0 system in order to bring it up to init4.  So I kind of
have the functional forms of several editors hard wired in.  I've
actually had nightmares that I've tried to exit by dream chanting
ControlX ControlC.  I know, it's a sad statement on my sense of how
reality works.

Anyway, one of the environments I use is:

MacVim 7.2 stable 1.2 (33.3) on
OSX 10.5.6

I've found that setting MacVim->Preferences->General->"Launch vim
processes in a login shell" is worth setting just to avoid surprises
re which ruby/rails/gem is being used.  I'm running ksh (but that's
just a personal preference) and my primary environment set to
Ruby1.9.2dev/Rails2.3.2 with Ruby1.8.[67] and Rails2.2.[0-2] available
as mix and match alternates.

Regarding your :Rserver problem with mongrel, the simplest way to kill
a process (for example, my server thin started in MacVim with
":Rserver thin") is to use the ps command to find it followed by the
kill command to do the snuff.  These are both unix commands so, in a
terminal window:

$ ps -elf | grep thin (or mongrel in your
case)
  501  5127     1       0   0  31  0   111016  32164 -      S
5f9b540 ??         2:02.41 ruby -C /Users/rick/vimtest script/server
thin -d                  0:59.80
  501 12872  6637    4002   0  31  0    66152      8 -      R+
5f9cb70 ttys000    0:00.00 grep
thin                                                          0:00.00

$ kill -9 5127

Did you see where the 5127 came from?

Another thing to understand about vim, any process (or edit session
for that matter) that starts in the foreground can be easily killed by
using the quit command ":q" or quit with extreme predjudice ":q!".  If
you have more than one vim frame in the current window the :q will
leave the window displaying the other frame - unless the one you
killed was the initial frame for that window.  I know, very confusing.

Here's a suggestion, either:

  get in the habit of grabbing a new window for each command or edit
session - that way you won't lose anything precious when your window
disappears

or:

  use the File->New Tab menu before issuing your new command - that
way your window will have multiple, browser-like tabs, that can be
independantly killed.

On a mac, you should never have to reboot to clean out a hung
application.  Check out the menu sequence "Apple->Force Quit" for a
point and click variation on the unix "kill -9 ...".  Of course it
won't work for applications started in the background (ala :Rserver)
but for wedged browsers et al it's the cat's pajamas.

Don't get discouraged - keep trying until you find an editor that
you're comfortable with, here are two others that I think are worth a
look.  They both have the benefit of context sensitive formatting
(color and autoindent) which I find very helpful when I'm looking for
the missing magic character.  They also all have the benefits of being
free and portable - although you might need to push a unix environment
onto a windoz box.

Aquamacs - a port of GnuEmacs to the mac that originates in New
Zealand (go conchords).  I like this a lot with the emacs-rails
package installed.  Like I said above, I'm actually way older than
emacs and have been using it since it was temacs so I'm kind of past
the learning curve.

NetBeans - from Sun.  Definitely worth a try - install the minimal
Ruby/Rails version only, unless you also need to do development in
any  of the other supported languages.  Does a lot of stuff, some of
it only almost.  Development continues with an active support group.

On May 6, 11:08 am, 7stud -- <[email protected]> wrote:
> 7stud -- wrote:
> > Rick Lloyd wrote:
>
> >>> Why is :Rserver useful? I hate that command.
>
> >> Does seem kind of like belts and suspenders doesn't it?
>
> >> I've actually found that ":Rserver thin" does not work in my
> >> environment.   Thin is started in the background and then silently
> >> dies.  However, ":!thin -d start" is the bee's knees.
>
> >> You might take a look at ":Rlog" to view your logfile in macvim.  It
> >> does the magic# -> color mapping so the logfile looks pretty.  There
> >> seems to be some delay in the logfile update.
>
> >> I'm not sure I'll stay with this for my development, I think that the
> >> rails package on aquamacs is a little more intuitive but that's a
> >> really subjective assessment.
>
> > Ok, I'll try :Rlog.
>
> Ok, I've had it.  I had some problems closing the Rlog window, and then
> ONCE AGAIN, I could not kill the server.  The other macvim window
> containing the server completely froze up.  It was unresponsive to
> Ctrl+C, and I couldn't even kill the window.  I had to quit macvim, and
> then once again I had to reboot to be able to start a server again.
>
> As a result, I am NEVER using macvim/rails.vim to start a server again!
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to