FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Support for executable in Rubygems

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
Chauk-Mean
Posted via mailing list.





PostPosted: Tue Aug 26, 2008 7:45 am    Post subject: Support for executable in Rubygems Reply with quote

Hi all,

I'm developing several gems that include executables i.e. ruby scripts that
are installed in the ruby installation bin directory during the installation
of the gems.
Typically, these ruby scripts do not have extension and Rubygems creates
automatically wrapper scripts for each platform (a bat file for Windows, a
shell script for Unix). This results in actual executable files (i.e. the
wrapper scripts) that are named as other executable files.

Currently :
1- Netbeans does not create automatically or optionnally the bin folder.
As a workaround, I create manually this bin folder and I specify it as a
"Source Folder" labelled "Executable Files" in the Project properties.
2- Syntax highlighting does not work for these executable files as they have
no extension. This is more annoying as I haven't found a workaround. It
would be really great if the file type can be specified according to the
container folder in addition to the file extension.

Thanks.

Chauk-Mean.
--
View this message in context: http://www.nabble.com/Support-for-executable-in-Rubygems-tp19157020p19157020.html
Sent from the NetBeans Ruby - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Aug 26, 2008 9:33 am    Post subject: Support for executable in Rubygems Reply with quote

Hi Chauk,

Chauk-Mean wrote:
[...]
Quote:
Currently :
1- Netbeans does not create automatically

that's true. It should be done for bin folder, since it is often used in
the Ruby projects. Can you file RFE into Issuezilla in ruby/projects?

Quote:
As a workaround, I create manually this bin folder and I specify it as a
"Source Folder" labelled "Executable Files" in the Project properties.

It's the right way.

Quote:
2- Syntax highlighting does not work for these executable files as they have
no extension. This is more annoying as I haven't found a workaround.

You do not need a workaround, if a Ruby file has right Shebang line, e.g.:

#!/usr/bin/env ruby

Ruby MimeType resolver detects the shebang and marks the file as Ruby
file. Otherwise there is no chance for IDE to detect this, other than to
parse content of each file to found out whether it looks like as Ruby
file which might become performance problem with e.g. thousand files.
Shebang line detection is still performance wise.

Quote:
It
would be really great if the file type can be specified according to the
container folder in addition to the file extension.

Not sure if this is a good idea. Then when you put some other file into
the folder, the detection would fail. The Shebang approach should work.

m.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Tue Aug 26, 2008 11:50 am    Post subject: Support for executable in Rubygems Reply with quote

Hi Martin,

Quote:
Quote:
1- Netbeans does not create automatically

Quote:
that's true. It should be done for bin folder, since it is often used in
the Ruby projects. Can you file RFE into Issuezilla in ruby/projects?

Done : Issue #145127.

Quote:
Quote:
2- Syntax highlighting does not work for these executable files as they
have
no extension. This is more annoying as I haven't found a workaround.

Quote:
You do not need a workaround, if a Ruby file has right Shebang line, e.g.:

Quote:
#!/usr/bin/env ruby

That's great. I didn't know this way for specifying file type.
But this does not work completely :
- the navigator works (i.e. it shows defined functions, variables ...)
- but there is no syntax highlighting in the editor. Curiously, syntax
errors are indicated if any.

My configuration : Netbeans 6.5 beta on Windows.
Should I file a bug report ?

Chauk-Mean.



--
View this message in context: http://www.nabble.com/Support-for-executable-in-Rubygems-tp19157020p19160314.html
Sent from the NetBeans Ruby - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Martin Krauskopf
Posted via mailing list.





PostPosted: Tue Aug 26, 2008 11:58 am    Post subject: Support for executable in Rubygems Reply with quote

Chauk-Mean wrote:
Quote:
Hi Martin,

Quote:
Quote:
1- Netbeans does not create automatically

Quote:
that's true. It should be done for bin folder, since it is often used in
the Ruby projects. Can you file RFE into Issuezilla in ruby/projects?

Done : Issue #145127.

Thanks.

[...]
Quote:
Quote:
#!/usr/bin/env ruby

That's great. I didn't know this way for specifying file type.
But this does not work completely :
- the navigator works (i.e. it shows defined functions, variables ...)
- but there is no syntax highlighting in the editor. Curiously, syntax
errors are indicated if any.

My configuration : Netbeans 6.5 beta on Windows.
Should I file a bug report ?

Does it work after restart of NetBeans? If yes, it is bug as well, so
please file against ruby/editing in any case.

Thanks,
m.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Chauk-Mean
Posted via mailing list.





PostPosted: Tue Aug 26, 2008 2:02 pm    Post subject: Support for executable in Rubygems Reply with quote

Hi,

Martin Krauskopf wrote:
Quote:
Does it work after restart of NetBeans? If yes, it is bug as well, so
please file against ruby/editing in any case.

For my first file, restarting Netbeans makes syntax highlighting work for
this file.

But I tried to create other files and this does not work even after a
restart.
I filed the Issue #145157.

I don't know how I have been able to make my first file recognized by
Netbeans as a Ruby file.

Chauk-Mean.

--
View this message in context: http://www.nabble.com/Support-for-executable-in-Rubygems-tp19157020p19162709.html
Sent from the NetBeans Ruby - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@ruby.netbeans.org
For additional commands, e-mail: users-help@ruby.netbeans.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB