Wednesday March 28, 2007
Since I cheated last week, I'll make up for it by posting several screenshots this week.
First: The continuous builds on deadlock.nbextras.org are back up and running. One of the things you'll find there is a Ruby-only slimmed down version of NetBeans. This might be attractive for those of you who are used to editing Ruby and think of IDEs as overkill. The download is not tiny, but that's because it includes a full installation of JRuby as well as Ruby On Rails and all its supporting libraries. Perhaps we can create a configuration which doesn't JRuby and Rails, since the tool is also perfectly happy to use any existing installations of Ruby and Rails you might point it at.
The configuration is experimental, so menu items etc. might not always be ordered correctly. But if you're a Ruby-only programmer, you'll find it less crowded than the full-featured IDE, and a faster download.
I've tried to improve the Rails support lately, since I've gotten lots of feedback from developers using NetBeans+Ruby with Rails.
Rails projects now have a "Rake Target" action, which is a pull right menu. The pull right shows, hierarchically, all the rake targets available for the project. The target descriptions, if any, are shown as tooltips. Recently executed targets are listed before the hierarchical list of available targets. (Determining the set of targets for the UI is expensive, so it is not kept up to date automatically. There is therefore an explicit user action for refreshing the list when you have edited your Rakefiles or have installed software which adds available targets.)
Database migrations are supported in a similar way. There is a "Migrate Database" context menu (as you can see above). It's a pull right menu which lets you choose either to migrate to the current version, or a specific version (the IDE lists versions that it finds in the migrations directory). You can also "run" any of your migrations files (Shift-F6), and this will run the corresponding migrations target with the version number of the migrations file.
Rails supports lots of additional code generators, performing tasks from generating login pages to localizations and sparklines. The Generator action is now fully aware of generator plugins. They show up in the generator drop down, and usage information is displayed for all generators right there, inlined in the generator dialog. In addition, there is an action for quickly installing more code generators in the Gem Manager.
I just integrated support for running the Mongrel web server, which is popular with many Rails developers. All you need to do now is install Mongrel via the Gem Manager and run your application.
Finally, it's been a few weeks since I added it, but it's useful enough to point out in case you missed it: There is a command for jumping from actions to views and back (Ctrl-Shift-View). It's in the Go To context menu as well.
(2007-03-28 11:16:01.0) Permalink Comments [54]
Posted by stinkyminky on March 28, 2007 at 02:29 PM PDT #
this minimal configuration is great. looks very tiny. it's getting better and better. :)
but i can't open the generators window. trying to open it by right clikcing the project -> Generate...
following exception:
i'm on windows xp SP2. German version. any hints? am i missing something? wrong version?
regards
Posted by pantarhei on March 28, 2007 at 03:09 PM PDT #
Posted by Tor Norbye on March 28, 2007 at 03:16 PM PDT #
Posted by pantarhei on March 28, 2007 at 03:19 PM PDT #
Posted by Dan on March 28, 2007 at 04:10 PM PDT #
Posted by Tor Norbye on March 28, 2007 at 04:16 PM PDT #
Posted by Dan on March 28, 2007 at 04:27 PM PDT #
Netbeans still seemed to pickup my previous modules?
What is the correct way to UnInstall netbeans on the Mac platform? (so I can start again from scratch with the latest daily build, and then just add the Ruby modules)
Thanks Greg
Posted by GregH on March 29, 2007 at 05:56 AM PDT #
Posted by 63.146.24.10 on March 29, 2007 at 08:41 AM PDT #
Greg, Sorry, upgrades etc. aren't working very well from one dev build to the next. The safest solution is to to wipe out the userdir (~/.netbeans/dev) to start from scratch; however, that will also erase any settings you've customized. You can delete things a bit more selectively if you know what you're doing; I can put that in a wiki page somewhere but I want to fix some other bugs first.
By the way, NetBeans 6 Milestone 8 was released today. You should upgrade to M8, then install the Ruby support. I will be updating some module dependencies shortly to -require- M8 (because Charlie Nutter was just telling me that M7+Ruby support is starting to have some flakiness issues; I think it's because I'm always developing against the latest NetBeans daily build; I'm not worrying about compatibility with milestones at this point.)
Posted by Tor Norbye on March 29, 2007 at 09:07 AM PDT #
Posted by ylon on March 29, 2007 at 09:23 AM PDT #
But, do you happen to know if Ruby/JRuby can be used as the language behind Matisse when developing Swing applications. That is to say, can we interchange between Java and Ruby/JRuby to write GUI (Swing) and Web applications, and at the same time will all the designers (Matisse form designer or VisualWebPack) within Netbeans generate the respective language skeletal code when we write event handlers? So, are there future plans for this, if it isn't already in the works? That would be really great.
Posted by Fleming on March 29, 2007 at 09:53 AM PDT #
Hi Fleming, Yes, JRuby can be used to build Swing applications - there are some demos in the JRuby installation. There are some plans to do something about this in the GUI builders, but it's definitely not on the short list.
Posted by Tor Norbye on March 29, 2007 at 10:04 AM PDT #
It might help in the proliferation desktop applications for all platforms that support Ruby & Java. I see Ruby+Netbeans+Matisse as the equivalent of (Visual) Basic, but only better. Perhaps, it could happen after the new Databinding in Swing+Matisse is completed ie. the next upgrade of Netbeans6.
Thanks.
Posted by Fleming on March 29, 2007 at 10:22 AM PDT #
Posted by ylon on March 29, 2007 at 10:25 AM PDT #
Posted by ylon on March 29, 2007 at 10:28 AM PDT #
Posted by ylon on March 29, 2007 at 10:57 AM PDT #
Hi Ylon, thanks for the comments. A number of the features you list are in the plans already. I hadn't thought of doing UML, although I supposed that would be possible.
Posted by Tor Norbye on March 29, 2007 at 11:46 AM PDT #
Posted by 76.181.178.140 on March 29, 2007 at 12:17 PM PDT #
http://www.malcolmhardie.com/sqleditor/cocoa/
Greg
PS. Tor, I was thinking a grey horizontal line between posts might make it easily to see who posted what in your blog? Just an idea
Posted by GregH on March 29, 2007 at 01:59 PM PDT #
Posted by Dan on March 29, 2007 at 02:04 PM PDT #
Also, after having downloaded build 621 earlier I'm curious as to the best method of application execution. I tried executing the shell script in bin, however received some errors in return. Is there a "pretty" wrapper I'm missing for Mac OS X?
Posted by ylon on March 29, 2007 at 02:35 PM PDT #
Posted by Tor Norbye on March 29, 2007 at 02:44 PM PDT #
(a) Is it not possible to "rename" an instant variable? (c.f. local) I get "can not perform this instance rename here)
(b) Can you allow a rake db:migrate VERSION=0, as well as other numbers (useful to clear database and rebuild)
cheers Greg
Posted by GregH on March 29, 2007 at 05:39 PM PDT #
It is already available. With some known bugs, but whatever new bugs are always welcomed :) You can find more at:
http://wiki.netbeans.org/wiki/view/RubyDebugging
which should always contains relatively up-to-date information.
Posted by Martin Krauskopf on March 29, 2007 at 11:45 PM PDT #
Posted by Klaasjan Tukker on March 30, 2007 at 03:58 AM PDT #
Posted by smok on March 30, 2007 at 05:29 AM PDT #
It just seems logical that all database development should be able to occur visually so as to build proper normalized models, etc.
Posted by ylon on March 30, 2007 at 08:08 AM PDT #
Posted by Klaasjan Tukker on March 30, 2007 at 11:48 AM PDT #
Also, Locomotive for Mac OS X might be a good example of how multiple web apps running simultaneously should be executed. I'm using it right now rather than webrick, etc.
Posted by ylon on March 30, 2007 at 01:23 PM PDT #
- I'll try to fix the blog template one of these weeks to add line separators
- I've fixed the issues in the slim ide related to startup warnings for some modules that cannot be enabled. There may be some issues with mac keybindings in the latest build; there were many changes in the mac keyboard handling in the netbeans platform over the last couple of days.
- GregH: I've just integrated a fix such that rake migration to Version 0 is always available in the menu. The menu -should- be populated with all other version numbers present in your migrations directory - is this not working or are there cases where you want other numbers?
- Regarding instant rename: Somebody else (Charlie Nutter I think) said it was broken in the slim ide as well. It worked for me when I did a basic test. If you can give me a testcase to reproduce (send direct e-mail to tor.norbye@sun.com or use issuezilla) that would help.
- Smok:There already is some basic HAML support checked into CVS (under languages/haml) but I haven't included it in the build configuration yet; I'll have to play with it first.
- Klaasjan: I've implemented Open Type, but it's not integrated yet; this touches on shared IDE infrastructure so the API needs to be cleaned up and the Java modules rewritten to use it etc. It will be coming soon! Regarding Mongrel support - I'm not sure how that happened (it worked for me, as the screenshot shows). Just to verify: You're using a -brand- new build, right? Hint: The Daily Update center is far from daily lately. You'll need version 0.50 of the Ruby module (look in Tools | Module Manager under the Feature category).
- Ylon and others - thanks for the ERD ideas. There are some ERD moduels for NetBeans and I know the database guys are working on this. I'll point them to this blog entry to see if they can make it work for Rails database handling as well.
Thanks for your comments everyone!Posted by Tor Norbye on March 30, 2007 at 05:45 PM PDT #
Posted by GregH on March 30, 2007 at 05:57 PM PDT #
Posted by GregH on March 30, 2007 at 06:37 PM PDT #
Posted by ylon on March 30, 2007 at 09:33 PM PDT #
http://wiki.netbeans.org/wiki/view/ERDSupport
Now how nice would that be to see tied into Rails... :)
Posted by ylon on March 30, 2007 at 10:19 PM PDT #
Posted by Jim Weirich on March 31, 2007 at 06:15 AM PDT #
For example, just right off the bat I noticed that, while creating a new project, I tried to double click and hold the "Project Location" field on one of the folders in the string. Rather keeping the set of chars that I had double clicked selected, it released those when I dragged backwards and just kept the preceding forward slash, then dragging forward did keep it selected. It should actually keep that '/' delimited folder selected whichever way you drag.
Should I report this as you'd previously mentioned versus here?
Posted by ylon on March 31, 2007 at 01:12 PM PDT #
Posted by ylon on March 31, 2007 at 01:38 PM PDT #
Posted by James Moore on March 31, 2007 at 03:15 PM PDT #
Also I'm finding that part of the NB GUI freezes for me & I have to restart. Some of the menu-bar functions work but the project side-bar and file windows are non-responsive for example. If there is a trace/log file I could send in to assist please let me know.
Greg
Posted by GregH on April 01, 2007 at 01:48 PM PDT #
Ylon, the best place to report issues is using the issue tracker; second best is on the scripting alias: dev@scripting.netbeans.org.
Regarding slow execution: Did you use the bundled (and default) JRuby, or reconfigure it to use native Ruby? Note that some JRuby rake scripts can take a dramatically long time to execute, because the way they have implemented "chmod" is to executive a separate process running the chmod command, rather than direct library calls (which are only available in JDK 6). They are working on better solutions for this, but just FYI - that could be the problem. There was just a thread on this on dev@jruby, where rake targets that take 10 seconds on native ruby take 3 minutes with JRuby. This is not a typical case and will be fixed soon, but that might be your problem - so try with native ruby.
James - there's no builtin continuous testing yet, but I've gotten a request for AutoTest which I was planning on providing. Would that suit your purposes or is there a better solution I should be looking at? (By the way, the test output running tests in the console is supposed to be hyperlinkable so you can walk the stack etc.)
Posted by Tor Norbye on April 02, 2007 at 08:06 AM PDT #
Posted by zerohalo on April 02, 2007 at 10:38 AM PDT #
Posted by times on April 02, 2007 at 12:19 PM PDT #
I have replaced it with native ruby and will try it again. I am curious; while it was indexing the new ruby path, I did a gem update and I was not sure whether it will detect changes and reindex only where appropriate accordingly, reindex everything and/or if I need to trigger that update. I'm hopeful that it intelligently searches for updates based upon a timestamp and automatically is triggered...
Also, you may take note of "footnotes" by Duane Johnson for TextMate Rails browser integration in Mac OS X. It is quite handy and would be a powerful addition to the development cycle when occasion requires.
Posted by ylon on April 02, 2007 at 02:17 PM PDT #
Posted by zerohalo on April 02, 2007 at 08:33 PM PDT #
Posted by Luke on April 03, 2007 at 08:10 AM PDT #
Posted by Arvid Walter on April 03, 2007 at 01:48 PM PDT #
Posted by Warren Wessels on April 03, 2007 at 04:10 PM PDT #
Posted by Warren Wessels on April 03, 2007 at 04:22 PM PDT #
Posted by Martin Krauskopf on April 04, 2007 at 02:01 AM PDT #
i.e. Easy way to then be able to run standard rails commands etc, for example "cap deploy".
Tks
Greg
PS. Still main blocking item for cutting over from Textmate for me would be the great textmate/bundles functionality.
Posted by GregH on April 04, 2007 at 02:46 AM PDT #
Posted by Michael on April 04, 2007 at 06:15 AM PDT #
Posted by Martin Krauskopf on April 05, 2007 at 12:47 AM PDT #
In any case, I've been able to get some work done. Greg, I was happy to see you say that the main blocking item for you is the TextMate bundles functionality, since I've been working on that; I just posted a blog entry on it: http://blogs.sun.com/tor/entry/ruby_screenshot_of_the_week7.
Regarding the slow indexing problems, yes, it looks like on some Linux installations there are symlinks out of the Ruby tree into much larger library trees, and the indexer happily follows them and wastes a lot of time. I'll look at some techniques for avoiding this (apparently comparing File.getCanonicalPath with File.getAbsolutePath detects symlink issues.)
Regarding sharing gems between Ruby and others: I know I need to support $GEM_HOME. Having JRuby and native Ruby share gems on the other hand may not work; native gems won't run on JRuby.
Regarding the forced Rails project structure: As a workaround, switch to the Files tab where you can see all files. I'll try to add the missing directories to the logical view.
Thanks for the other requests as well. By the way I just heard from the UML guy that the new NetBeans 6.0 UML architecture will make it much easier to support Ruby code generation, but I don't have the details yet; it's not high on my list given all the other stuff that needs to get done.
Posted by Tor Norbye on April 05, 2007 at 03:49 PM PDT #