Picon
Favicon

Request to add module as friend to ruby modules

Hi,

       I am a developer from portal pack netbeans project. We have plan to provide development/deployment support for ruby portlet through netbeans IDE. So we want to leverage on the existing api exposed by ruby modules. But as the api provided by ruby modules are only exposed to friend modules, we would like to add portal pack module as a friend module to ruby modules.

Could you please add org.netbeans.modules.portalpack.commons   to  ruby.platform and ruby.railsprojects ?

Thanks in Advance !!!
Satya
Sandip Chitale | 17 Jul 18:45
Picon
Favicon

Re: [nbajax] Would like a better idea of how javascript debugging is meant to work with templates (e.g. erb/rhtml)

Anthony Richardson wrote:
> Cross posted to nbajax@...
<mailto:nbajax@...> and 
> dev@... <mailto:dev@...>
>
> I wanted to get an idea of what the expected level of functionality 
> the javascript debugger is going to be capable of offering when 
> debugging webpages generated from templates.
>
> I'm using Ruby on Rails and all responses returned to the browser are 
> constructed from erb files (although other templating systems are also 
> available). Basically a erb file is a normal HTML file with support 
> for embedded ruby code. Rails constructs the responses by merging many 
> erb files to create the resulting response to the user. Often the same 
> erb file is called many times with different parameters for 
> constructing things like lists etc..
>
> Is it expected that developers will be able to place breakpoints in 
> these erb files in any location and have the debugger resolve the 
> locations of the many source files that may have contributed to the 
> resulting page the user is currently viewing? (I'm not sure that this 
> is even possible without injecting debugging specific markup into the 
> served page as the page construction is a lossy process like compilation).
In 6.5 it is only possible to set the breakpoints in html and javascript 
files as long as the URL as seen by the browser can be mapped to the 
file in the project by simple lookup of the path part of the URL 
relative to the source roots in the project. You will be able to set the 
breakpoints in the HTML that the browser sees in terms of URL. To load 
this html you need to go to the Windows:Debugging:Sources window, select 
the URL and use "Go to Source" action to load it in the editor tab - the 
editor tab title will show the http:///..../ like name (tooltip will 
show the full name). This of course is a read-only editor. You should be 
able to use features like:
- set breakpoint
- hover caret over an identifier or a selection to show the values in 
tooltip when the debugger is suspended (breakpoint, debugger keyword or 
while stepping)
- create watches from selection
>
> I have experimented with setting break points in a default Rails 
> application and the results are less than stellar. I can't get the 
> javascript debugger to reliably stop at a breakpoint in a erb file. I 
> can get it to work well for static HTML files if I use the full url 
> e.g. localhost:3000/index.html rather than localhost:3000.
This particular issue has now been fixed. localhost:3000 is now 
automatically mapped to public/index.html
> I can also get breakpoints working with included JS files, but only if 
> they don't have parameters(isses #140442)
See above.
>
> In the past I have got the debugger to stop at some breakpoints in a 
> rhtml file that was a single rhtml with no layouts or partials (not 
> the Rails default way of doing things). But the debugging features 
> were broken after it has stopped and there was nothing you could do 
> except cancel the debugging session. I haven't been able to repeat 
> this limited success with later builds and using erb files.
The breakpoints in RHTML file are server side breakpoints. To debug 
RHTML files you will have to use the technique described above.
>
> I'm not privy to how the javascript debugger works, but from the 
> little bits I have gleamed I think it does some sort of matching the 
> URL to the files on disk.
Yes. RIght now it is a very simple mappping - only for html and 
javascript files. This is because the line number mapping is identical.
> I can't see how this is going to work with Rails as this link is 
> tenuous at best. Especially when using restful routing (the default 
> and preferred method) with nested resources. The generated URL do not 
> match the file system structure at all.
>
> e.g.
> localhost:3000/people/1/addresses would call the AddressController and 
> load the view /app/views/addresses/index.html.erb by default. Rails 
> knows to pull apart the URL and supply the person ID of 1 as a 
> parameter to the addresses controller.
We will implement more sophisticated mapping in future releases.
>
> Some guidance on what level of support/behaviour you guys are aiming 
> at would be very helpful.
>
Regards,
Sandip
Anthony Richardson | 17 Jul 05:39
Favicon

Would like a better idea of how javascript debugging is meant to work with templates (e.g. erb/rhtml)

Cross posted to nbajax-gVrGfPuBK2Jg9hUCZPvPmw@public.gmane.org and dev-n3CzLFQkLgrXWKka9uoeGti2O/JbrIOy@public.gmane.org

I wanted to get an idea of what the expected level of functionality the javascript debugger is going to be capable of offering when debugging web pages generated from templates.

I'm using Ruby on Rails and all responses returned to the browser are constructed from erb files (although other templating systems are also available). Basically a erb file is a normal HTML file with support for embedded ruby code. Rails constructs the responses by merging many erb files to create the resulting response to the user. Often the same erb file is called many times with different parameters for constructing things like lists etc..

Is it expected that developers will be able to place breakpoints in these erb files in any location and have the debugger resolve the locations of the many source files that may have contributed to the resulting page the user is currently viewing? (I'm not sure that this is even possible without injecting debugging specific markup into the served page as the page construction is a lossy process like compilation).

I have experimented with setting break points in a default Rails application and the results are less than stellar. I can't get the javascript debugger to reliably stop at a breakpoint in a erb file. I can get it to work well for static HTML files if I use the full url e.g. localhost:3000/index.html rather than localhost:3000. I can also get breakpoints working with included JS files, but only if they don't have parameters(isses #140442)

In the past I have got the debugger to stop at some breakpoints in a rhtml file that was a single rhtml with no layouts or partials (not the Rails default way of doing things). But the debugging features were broken after it has stopped and there was nothing you could do except cancel the debugging session. I haven't been able to repeat this limited success with later builds and using erb files.

I'm not privy to how the javascript debugger works, but from the little bits I have gleamed I think it does some sort of matching the URL to the files on disk. I can't see how this is going to work with Rails as this link is tenuous at best. Especially when using restful routing (the default and preferred method) with nested resources. The generated URL do not match the file system structure at all.

e.g.
localhost:3000/people/1/
addresses would call the AddressController and load the view /app/views/addresses/index.html.erb by default. Rails knows to pull apart the URL and supply the person ID of 1 as a parameter to the addresses controller.

Some guidance on what level of support/behaviour you guys are aiming at would be very helpful.

Cheers,

Anthony Richardson
Picon
Favicon

JRuby 1.1.3 coming up fast

Sorry about the short notice on these lists, but we're looking to push 
JRuby 1.1.3 no later than Friday. We're going to have over 200 bug fixes 
included as well as various performance, memory, threading, and other 
improvements. Now would be a good time to run any regression tests you 
have or look at the pending release (basically trunk right now) and see 
if there's any emergencies that should be addressed.

We'll be on freenode IRC in #jruby the rest of the week to field questions.

- Charlie
Chris Kutler | 15 Jul 22:52
Picon
Favicon

6.5 Ruby Project Question,

http://wiki.netbeans.org/NewAndNoteWorthy for 6.5 says

Ruby
 Projects
   possibility to pass JVM options to the JRuby (e.g. 
-Djruby.objectspace.enabled=true)

Where and how do I do this.

Let's say that I want to pass -J-Xmx1024m to JRuby. Where do I do this?

Can you give me a few examples of passing JVM options to JRuby?
Peter Williams | 15 Jul 22:30
Picon
Favicon

Is a JRuby 1.1.3 upgrade planned?

JRuby 1.1.3 will be out soon (end of week, maybe later, but certainly 
well before NB 6.5 :o)

Any plans to upgrade to this and when?

-Peter
James Moore | 11 Jul 19:06
Picon

JavaScript Library Manager Kit - The module named org.netbeans.modules.javascript.libraries was needed and not found.

I'm seeing this dialog when I start up:

Warning - could not install some modules:
	JavaScript Library Manager Kit - The module named
org.netbeans.modules.javascript.libraries was needed and not found.

I tried a full rebuild (ant clean; ant) and removing my userdir.

Do I need to do something extra to pull in the javascript libraries?

I'm updated to changeset:   89269:d73f1796a253

--

-- 
James Moore | james@...
Ruby and Ruby on Rails consulting
blog.restphone.com
Chris Kutler | 11 Jul 05:48
Picon
Favicon

questions about default GlassFish deployment for JRuby apps

While trying to learn about the new behavior (the default server is JRuby) when running JRuby apps, I ran into
http://www.netbeans.org/issues/show_bug.cgi?id=139188 I was not able to get any of the expected URLs to work (that is, the 8080 equivalent of the 3000 URLs). For example, for the sample Depot application,
http://localhost:8080/store does not work, when I select GlassFish for the server.

However, when I select WEBrick for the server,

http://localhost:3000/store

does work.


Now, on to the questions

1) I discovered that if I opened the GlassFish server's properties, clicked the JRuby tab and selected the Deploy All Rails Applications At Root Context checkbox, and redeployed the app, then the above URL worked.

So, it seems to me that our users must not want to deploy Rails apps at the root context. Why wouldn't they? If you don't check the box, what URLs do you use to access the Rails app. When/why would one decide to check this box (it seems to me that the box should be checked by default, but I am sure I am not understanding what the default behavior should be). I certainly need some help to describe to our uses when they need to go and check this box.


2) I noticed that when I went to delete public/index.html from a Rails application that I was working on I got an error message from the IDE saying it was unable to delete the file (it didn't say why), I had to shutdown GF before I could delete the file. This was never a problem with WEBrick. Is this as expected for GF, if so, I had better document it?










Chris Kutler | 10 Jul 02:34
Picon
Favicon

Question about Mark Occurrences.

In the May 28 entry in http://wiki.netbeans.org/RubyRecentChanges is the following

Mark Occurrences: You can press Ctrl-Up and Ctrl-Down to navigate through the other occurrences of the current symbol

I opened the Depot sample app and opened store_controller.rb.

I selected <at> cart.

I noticed that both <at> cart and :cart are highlighted? For example:

   <at> cart = (session[:cart] ||= Cart.new)

Is this the way it is supposed to be? 

I tried Ctrl-Up and Ctrl-Down but it didn't navigate, instead the file scrolled a line or two. Is it supposed to be Ctrl for the Mac and Alt for the rest?

Chris Kutler | 10 Jul 02:12
Picon
Favicon

Recent Changes questions

Re: http://wiki.netbeans.org/RubyRecentChanges

I don't see any activity after June 5. Should I look elsewhere to learn 
about 6.5 changes (in addition to New & Noteworthy and the Mercurial 
browser)? I just want to make sure I know about all the changes so that 
I can document them.

In regards to " Semantic Highlighting: Code rewritten; should be more 
efficient, some range bugs fixed. Tooltips on unused ranges." What is 
meant by "Tooltips on unused ranges"? I don't understand what that means.
Chris Kutler | 9 Jul 21:26
Picon
Favicon

Help Buttons in New and Existing Ruby windows and dialog boxes.

Hello,

Do we have any new Ruby/Rails windows or dialog boxes with Help buttons 
that need help text? If so, I need the ids for the online help.

Is there a way to get a list of the existing Ruby/Rails windows & dialog 
boxes that have help buttons along with their ids? I already found one 
with a help button that is not wired up (that is, there is no help for 
that id), and I need to make sure we have help for every button (or the 
buttons get removed).

Also, what is my deadline for negotiating ids and addition/removal of 
buttons?

Thanks,

Chris

Gmane