Thursday, May 14, 2009

ruby script/plugin git does not work in Rails 2.3.2 and Ruby 1.9

Lots of people are scratching there head over why they cannot
install rails plugins using git.

I'm working with Ruby 1.9.1 and Rails 2.3.2. And git is a pretty natural
for working with version control.


So I wanted to pull from my own respository, but kept getting
a error on tryping to do the install.

sin-gwest-laptop:testjq gwest$ ruby script/plugin --verbose install git://github.com/glennswest/activejquery.git
Plugins will be installed using http
Plugin not found: ["git://github.com/glennswest/activejquery.git"]
#<TypeError: can't convert Array into String>


Come to find out, this is a known but as the mkdir_p call has changed its
return parameter in Ruby 1.9 and that messes up the install of git plugins
unless you do the patch

https://rails.lighthouseapp.com/attachments/90768/plugin_mkdir_p.diff


ActiveJquery Goes to version .011

I've updated ActiveJquery on github to .011


That was fun. I thought I'd put the authtoken issue to bed.
On doing test for delete and add, found I still was getting authtoken
issues. So I moved from using editData jqgrid parameters to adding
it to the editurl.

Also found a bug in the page based xml pull of the controller component.
This would result in you not seeing the last 10 records. (You notice that
when your adding records and they dont show up).

ActiveJquery consists of:

1. active_jquery               - The controller plugin
2. active_jquery_runtime - Generates the dynamic jqgrid javascript
3. Dynamic Javascript      - The code that runs in the browser
4. jQuery/Jquery UI/jqGrid

I've also combined all the needed public css and javascript into the plugin.

Need to add a rake task and init that makes sure they get copied.


ActiveJquery Reaches Version .010

ActiveJquery, which is designed to integrate Jqgrid, Jquery UI into rails, is
now at Version 0.010.

It now is a Rails 2.3.3 Controller Plugin. You can invoke it in a single
line in your controller.

The plugin automatically generates javascript for the grid, based on your table,
with inline editing. As well as a full REST server to serve the data to the browswer.

I've implemented the ForgeryProtection on Posts, and that is working. Seems like a bit of comfusion in BLogSpere about weather the URI Components need to be encoded or not. Least in Ruby 1.9.1 and Rails 2.3.2 They do NOT need to be encoded.

Todo:
1. Allow Customizations
2. Allow Relationships and SubTables
3. JQuery UI Menus

Test and More TEst

Also I will implement a rails DEMO app that is based on data from the JQGRID site.

I'll make a separate git repository for the demo.