Loading ...
Sorry, an error occurred while loading the content.

Re: Failing :make in Ruby code.

Expand Messages
  • björn
    ... Hi Jon, As far as I understand things, with :compiler ruby the option makeprg is set to ruby -w $* , so when you call :make this will execute ruby
    Message 1 of 2 , May 26, 2009
      2009/5/26 Hunt Jon:
      > I have a file "test.rb", whose inside is
      > puts "hello"
      > and I set
      > compiler ruby
      > and when I run the command
      > :make
      > I get
      > :!ruby -w 2>&1 | tee /var/folder/d0/do0TTR5HJasTI/-Tmp-Tv334430/2
      > and I get no more output.
      > All I could do is to run Control-C to stop the operation.
      > When I simply type
      > :!ruby test.rb
      > The output says "hello" correctly.
      > Any help would be appreciated.

      Hi Jon,

      As far as I understand things, with ":compiler ruby" the option
      'makeprg' is set to "ruby -w $*", so when you call ":make" this will
      execute "ruby -w" with no filename since the $* expands to whatever
      parameters you pass to :make (and in this example I passed no

      One way to get things to work is to say ":make %" instead (% expands
      to the current filename). Alternatively you could ":set makeprg=ruby\
      -w\ %", which would allow you to simply call ":make" with no
      parameters and the current filename would be filled in for you.

      You may want to read up on ":h makeprg" and ":h :make".

      Hope that helps,

      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.