Skip to main content

Ruby on Rails Documentation

7 replies [Last post]
pbadams
Offline
Joined: 2008-05-03
Points: 0

Hi,

I'm a Ruby on Rails developer and have been using Netbeans for about 6 months. I've recently come across jMaki (like the day before yesterday) and am very excited by what it can offer me, especially as I am a novice in JavaScript (I've mainly been DB backed static HTML and have about 12 months EJB experience albeit 5 years ago!)

However, specific Ruby on Rails documentation is a bit sparse (to be charitable) and although with the help of Netbeans 6.1 integration, got some examples working, I'm hitting a brick wall with specifics.

For instance, I want to use a yahoo editor in a Rails form, but cannot figure out how to get it to play nice. Also, the editor gets rendered at the top of my page and not in the DIV where I placed the code.

Also, how do I pass parameters to jMaki components in RoR?

Are there any other RoR developers out there? Can yo help? Can we build some helpful wiki pages to get a newbie rolling (beyond the ubiquitous yahoo table examples)?

Regards,
Paul Adams.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pbadams
Offline
Joined: 2008-05-03
Points: 0

Its been nearly 2 months since my original posting about jMaki documentation and I've not heard anything from Sun engineers willing to help me document jMaki for RoR users.

Two months is a long time on the web. Things change. Having tried to get jMaki working with Rails in Netbeans, having wrestled with the minimal documentation for Rails, I have not got very far. Judging from the 1000+ reads this thread has received, there is a lot of interest in "Ruby on Rails Documentation," but alas, no official help.

My initial enthusiasm is now lost. jMaki was promising, but is not accessable - so I won't be using it in my upcoming project. Instead, I'm looking to SproutCore with its MVC structure and roots in Ruby.

I'll keep an eye out here to see if anything develops but I haven't got time to wait for non-existent help.

Good luck everyone,
Paul

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Paul,

Being a community driven project documentation tends to be one of those things that is a little more difficult to get the dev team excited about. I'm sorry that we were not able to help you more quickly.

Sprout Core looks promising and we wish you the best of luck with it.

If you ever choose to work with jMaki again the best way to get help from the dev team is via the alias (dev@ajax.dev.java.net). Not everyone monitors this thread and sometimes things do get overlooked.

Regards,

-Greg

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Paul,

It's nice to meet you. My name is Greg and I work on jMaki and with Netbeans. I come from an EJB/ JavaEE background myself. We created jMaki to get developers not familiar with JavaScript up and running fast.

A great starting point for jMaki with Ruby on Rails is here:

http://weblogs.java.net/blog/arungupta/archive/2007/05/jmaki_on_rails.html

I suspect you have already seen this and other ruby samples would be helpful. What kind of samples would help you best?

Arun is a great resource for RoR with jMaki. We have a few at Sun too which we can bring into conversations if needed.

As far as integrating with a Ruby form I would suggest creating a div to put the jMaki widget in and giving it a static size. We have wrapped all the Yahoo and other widgets to size to the container they are put in.

Are you putting a doc type in your page? This might be the source of your problem:

Try adding:

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

at the top

Our wiki is here:

http://wiki.java.net/bin/view/Projects/jMaki

Currently we don't have any pages on RoR but we would love to have you get involved. I believe you can edit this as an observer of the project and if not we can pair you with a developer to make sure any documents you want can get posted.

We look forward to working with you,

-Greg

pbadams
Offline
Joined: 2008-05-03
Points: 0

Hi Greg,

Thanks for your kind welcome and advice.

I had already checked out Arun's blog and had got some good pointers, but the information is for Netbeans 6.0 and it looks like jMaki support in 6.1 is greatly improved.

I looked into your DOCTYPE trick. Working with a new ERB file generated by scaffold gave me correct results. However, the file I want to add the Yahoo editor to is a template file supplied with a Rails plugin and I suspect it is not well formed, so I will keep looking.

I want to use the Yahoo Editor to manipulate a textarea in a Rails form within my view and NOT as an AJAX control (at least not yet). The generated code creates a textarea with the name and id of "yahoo_editor_1" and this is not bundled up by Rails as part of my form. If there was some way for me to get jMaki to generate the name and id in the format of "form[text]" it should work (where text is an attrib of my model.) As it stands, when I get into my controller my form object has no "text" attribute, but I have an empty "yahoo_editor_1" parameter.

Again, I know I'm not using the editor as an Ajax control, but I'd like to leverage the packaging convenience of jMaki to reuse the component in a traditional HTML form (via Rails forms) and not have to spend hours debugging initialisation JavaScript (not my strong suit).

This brings me back to documentation. I've tried to cobble together a working yahooEditor widget from guesswork based on the documentation here: http://ajax.dev.java.net/docs/jmdocs/

But the Yahoo Editor page (http://ajax.dev.java.net/docs/jmdocs/yahoo/editor/doc.html) can't be found, so I'm on my own :-)

So I'd like to buddy up with some jMaki/RoR developer(s) to:

1) Build some strong RoR reference material on a widget level and
2) Create RoR specific use-case tutorials.

Looking forward to your reply.
Regards,
Paul

sitara
Offline
Joined: 2008-05-23
Points: 0

I am in a similar situation. I very much like the look of jmaki for RoR but I haven't been able to get past the very basic level of implementation.

Two things in particular puzzle me:
1. I get messages in my code saying that the 'proxy' is not yet implemented in Ruby. What does this mean and what are the implications?
2. The only examples I have seen are read-only. Some of the helpers are clearly supposed to update objects, but how does that work? How is the helper associated with the attribute to edit?

Are these two questions connected?

Is 1.8 the next major release or will that be 2.0?

I would really appreciate some feedback. Is there an IRC channel where these things can be discussed on-line?

Many thanks,

Keith

pbadams
Offline
Joined: 2008-05-03
Points: 0

Hi Keith,

Yes, I've seen the "Proxy" messages too. It seems that RoR is not a priority for jMaki development as Java or PHP, which is a shame, as it has the potential to do for AJAX programming what Rails is doing for server-side development.

As I've mentioned here, I'm willing to work with existing jMaki team members to document tutorials and reference materials to help new starters like you and me get running fast.

Greg originally replied to my question - are you still around? Can you help?

Regards,
Paul "Still excited about jMaki, but need some more help" Adams

kutlerc
Offline
Joined: 2003-07-09
Points: 0

I haven't worked with jMaki ROR since last December (http://blogs.sun.com/divas/entry/five_minute_ruby_jmaki_tutorial). I wanted to get up to date but it doesn't seem to be working with my 6.1 version of the IDE. I first installed the jMaki plugin from the NetBeans update center, but my Palette window is empty in my ROR app. So, I uninstalled that and downloaded the plugin from https://ajax.dev.java.net/download.html. That one didn't show widgets in the Palette either (they do appear for JSP projects).

Does the update center plugin no longer support Ruby and Rails? Do we go back to doing it manually as in last years blog by Arun? http://weblogs.java.net/blog/arungupta/archive/2007/05/jmaki_on_rails.html (that is, no Palette)?