This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145157 - File type setting by Shebang does not work
Summary: File type setting by Shebang does not work
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All Windows ME/2000
: P4 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-26 14:42 UTC by chaukmean
Modified: 2011-01-28 20:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chaukmean 2008-08-26 14:42:52 UTC
1. Create an empty file without an extension (e.g. my_exec) with the following contents :
#!ruby

msg = "Hello"
puts msg

2. After saving the file, the file is not recognized as a Ruby file
3. Restarting Netbeans does not have any effect.
4. Using the following shebang does not help either :
#!/usr/bin/env ruby

I'm using Netbeans 6.5 beta.
Comment 1 Martin Krauskopf 2008-08-26 14:52:08 UTC
Strange, that restart does not help. With the latest build:

  http://wiki.netbeans.org/RubyInstallation#section-RubyInstallation-HowDoIGetTheContinuousBuilds

if I:

- open 'some_file' without '.rb' (or other Ruby) extension and without Shebang line, it is not colored
- when I then put '#!/usr/bin/env ruby' on the first line, the file is still not colored
- when I restart the IDE and open the file, it *is* colored correctly
(colored == syntax highlighting)
Comment 2 chaukmean 2008-08-26 16:32:30 UTC
I just tried hudson-trunk-3568 and this does not work either.
Restarting Netbeans has no effect. Note that I'm on Windows.
Comment 3 Erno Mononen 2009-05-21 13:49:11 UTC
Seems to work for me (with #!/usr/bin/env ruby), can you try whether this still happens to you 6.7 dev (http://
bits.netbeans.org/dev/nightly/latest/)?
Comment 4 Tomas Danek 2009-09-18 08:56:42 UTC
somehow does not work for me neither in 090915;

#!/usr/bin/env ruby

puts "aaa"

does not get colored.