Topic: Jqgrid-rails3 plugin and Rails 3.1, "will_paginate" gem?
Hello,
I am trying to get the jgrid-rails3 plugin from git://github.com/davebaldwin/jqgrid-rails3.git to work. But there seems to be a problem with the "will_paginate" gem, of which I am using version 3.0.2. If I include it in the gemfile, and then try to generate a simple model of a User with name and email (both strings), I get lots of error messages:
C:\RailsInstaller\Ruby1.9.2\bin\ruby.exe -e
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
C:/Sites/jqgrid-rails3.1.1-test/script/rails generate model User name:string email:string -s
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require':
C:/Sites/jqgrid-rails3.1.1-test/vendor/plugins/jqgrid-rails3/lib/view.rb:373: syntax error, unexpected keyword_end, expecting ')' (SyntaxError)
C:/Sites/jqgrid-rails3.1.1-test/vendor/plugins/jqgrid-rails3/lib/view.rb:637: class definition in method body
C:/Sites/jqgrid-rails3.1.1-test/vendor/plugins/jqgrid-rails3/lib/view.rb:639: syntax error, unexpected $end, expecting keyword_end
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from C:/Sites/jqgrid-rails3.1.1-test/vendor/plugins/jqgrid-rails3/init.rb:1:in `block in <class:Plugin>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/plugin.rb:81:in `eval'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/plugin.rb:81:in `block in <class:Plugin>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/jqgrid-rails3.1.1-test/config/environment.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:22:in `<top (required)>'
from C:/Sites/jqgrid-rails3.1.1-test/script/rails:6:in `require'
from C:/Sites/jqgrid-rails3.1.1-test/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
However, if I ommit the "will paginate" entry, I can generate both the model and also the controller and the view for the jqgrid, but if I insert "localhost:3000/users" in the browser, it complains about the missing "paginate".
Am I missing something obvious? How can I get the jqgrid-rails3 plugin to work?
Or is there some better datagrid for Rails 3.1?
Thanks a lot!
Stefan