Problem with rails session
--------------------------

                 Key: JRUBY-3530
                 URL: http://jira.codehaus.org/browse/JRUBY-3530
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.2
         Environment: OS X
            Reporter: Miika Leppänen
            Assignee: Thomas E Enebo


jruby 1.3.0 (ruby 1.8.6p287) (2009-03-26 r6586) (Java HotSpot(TM) 64-Bit Server 
VM 1.6.0_07) [x86_64-java]
To reproduce error:

{{$ rails globtest}}

change adapter to config/database.yml
  {code}adapter: jdbcsqlite3{code}

{{$ script/generate controller Hello index}}

{code:title=app/controllers/hello_controller.rb}
class HelloController < ApplicationController
  def index
    flash[:notice] = t('hello')
  end
end
{code}

{code:title=app/views/hello/index.html.erb}
<p><%= flash[:notice] %></p>
{code}
 
{{$ script/plugin install git://github.com/joshmh/globalize2.git}}
{{$ jruby script/server}}

open
http://localhost:3000/hello

and reload it, you should get error:

{code}
NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]):
  app/controllers/hello_controller.rb:3:in `index'
  /usr/local/jruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /usr/local/jruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /usr/local/jruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  :1:in `start'
{code}

I'm not sure is the issue with globalize2 plugin or with JRuby, but this works 
when run with JRuby 1.1.6. 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to