Ruby File Template changes not honored?

I wanted my Ruby files to have this standard header:
/usr/bin/env ruby.

I add it here:
Settings->File Templates->Includes->Ruby File Header and can see it in that dialog. Click OK.

In Project View -> Alt+Insert->New File->foo.rb

But foo.rb does not get the configured header. What am I missing?

Regards,
Kedar

3 comments
Comment actions Permalink

There's more to it.

After creating the template for a Ruby file this way, I stumbled on yet another bug.

  • Alt+Insert -> TestUnit Test Template
  • This *does* get the File Header I configured (#!/usr/bin/env ruby), but it gets prepended to require "test/unit" so that the first line becomes wrong: #!/usr/bin/env rubyrequire "test/unit"


So, this is not working as expected :(

0
Comment actions Permalink

Hello Kedar,

I've created an issue for this: http://youtrack.jetbrains.net/issue/RUBY-7332
Feel free to vote, comment and get notified once it is fixed.

Regards,
Oleg

0
Comment actions Permalink
  • This *does* get the File Header I configured (#!/usr/bin/env ruby), but it gets prepended to require "test/unit" so that the first line becomes wrong: #!/usr/bin/env rubyrequire "test/unit"

To make it work properly just add the linefeed to the end of Ruby File Header Template.

Regards,
Oleg

0

Please sign in to leave a comment.