When running Ruby on Rails in a war using the GoldSpike servlets and context-param jruby.standalone is set to true you will need to use the jruby-complete jar file. Rails requires Gems in order to boot strap. I found that using the jruby jar file caused Rails to fail in initializer.rb when it tried to require 'logger' which is included in the ActiveSupport gem.
Also be sure to copy your required gems into WEB-INF/gems.
[EDIT: Better yet use ruby gem install --install-dir WEB-INF/gems. ]
I've rarely used auto completing text fields in the past, because the field I'd autocomplete against wasn't unique. (Use case: Select the party to create a trouble ticket for by name. The names aren't guaranteed to be unique.)
In the past when I've needed to do this in Struts 2 I rolled my own Javascript to manage a hidden id field.
Those do it my own days are over. Take a look at Model Auto Completer for the win.
Some quick notes:
Great plugin and pretty much the standard for adding login and authentication to a Rails project.
The README used to have the information about how to secure your controllers, but that seems to have gone missing. Take a look at AuthenenticatedSystem in your lib directory. Include that in some base controller class with a before_filter :login_required as a starter.
Warbler by Nick Sieger is a great tool for packaging a Rails app for deployment as a war file on a Java application server. Quick no nonsense approach.
The only draw back I found was that adding gems to the warbler.rb config file, such as activerecord-jdbc-adapter and jruby-openssl made running my normal Ruby installation's rake fail because I don't have those gems installed for use by my CRuby installation, because the don't work. My quick solution to this was the following:
config.gems << "activerecord-jdbc-adapter" if defined? JRUBY_VERSION config.gems << 'jruby-openssl' if defined? JRUBY_VERSION
The guard simply interrogates the environment to see if we're running in JRuby. If we're not it just ignores those lines. This allows me to keep happily developing in CRuby and deploy on JRuby.
Recent comments
1 week 6 days ago
2 weeks 3 days ago
3 weeks 9 hours ago
3 weeks 6 days ago
4 weeks 2 days ago
4 weeks 2 days ago
5 weeks 24 min ago
8 weeks 1 day ago
8 weeks 6 days ago
8 weeks 6 days ago