I'm facing the same problem. I am trying to connect merb with rails
and have it handle file uploads. Both are using memached, and printing
session.session_id on both sides gives me the same value. However, I
keep getting

Could not retrieve session from Merb::MemcacheSession: undefined
method `retrieve_session' for nil:NilClass

on the merb side, and I am unable to access any session data (to find
out which user is uploading the file).

any ideas?

On Jan 19, 10:29 am, Khaled al Habache <[email protected]> wrote:
> i got the same errors even for another controller:
>
> Could not retrieve session from Merb::MemcacheSession: undefined method
> `retrieve_session' for nil:NilClass
> ___________________________
> Eng Khaled alHabachehttp://www.khelll.com
>
> On Mon, Jan 19, 2009 at 1:04 AM, Ezra Zygmuntowicz <[email protected]>wrote:
>
>
>
> >        You cannot route the the application controller, it is protected
> > from
> > the web and only meant to be used as a parent controller. You can
> > define those methods there but try routing to them from another
> > controller that inherits from application.
>
> > Cheers-
> > -Ezra
>
> > On Jan 18, 2009, at 1:32 PM, Khaled al Habache wrote:
>
> > > I'm using memcached as a session store, however i have this simple
> > > dummy action to test the session
>
> > > class Application < Merb::Controller
> > >     def name
> > >         session[:name] = "khelll"
> > >         return session[:name]
> > >     end
>
> > >     def what
> > >         return session[:name]
> > >     end
> > > end
>
> > > When hittinghttp://localhost:4000/application/namei get:
>
> > > erb : worker (port 4000) ~ Could not retrieve session from
> > > Merb::MemcacheSession: undefined method `retrieve_session' for
> > > nil:NilClass
> > > merb : worker (port 4000) ~ Could not persist session to
> > > Merb::MemcacheSession: undefined method `store_session' for
> > > nil:NilClass
>
> > > And when hittinghttp://localhost:4000/application/whati get:
>
> > > Could not retrieve session from Merb::MemcacheSession: undefined
> > > method `retrieve_session' for nil:NilClass
>
> > > Here are the settings in my init.rb
>
> > > # Go tohttp://wiki.merbivore.com/pages/init-rb
>
> > > require 'config/dependencies.rb'
>
> > > use_orm :datamapper
> > > use_test :rspec
> > > use_template_engine :erb
>
> > > Merb::Config.use do |c|
> > >   c[:use_mutex] = false
> > >   c[:session_store] = 'memcache'  # can also be 'memory',
> > > 'memcache', 'container', 'datamapper
>
> > >   # cookie session store configuration
> > >   #c[:session_secret_key]  =
> > > 'f1b83137246272f530eb915d5472e1e69e8a4ce9'  # required for cookie
> > > session store
> > >   #c[:session_id_key] = '_dude2_session_id' # cookie session id key,
> > > defaults to "_session_id"
> > > end
>
> > > Merb::BootLoader.before_app_loads do
> > >   # This will get executed after dependencies have been loaded but
> > > before your app's classes have loaded.
> > > end
>
> > > Merb::BootLoader.after_app_loads do
> > >   # This will get executed after your app's classes have been loaded.
> > > end
>
> > > dependency "merb-cache" do
> > >   Merb::Cache.setup do
> > >     register(:memcached, Merb::Cache::MemcachedStore, :namespace =>
> > > "my_app", :servers => ["127.0.0.1:11211"])
> > >   end
> > > end
>
> > > Any suggestion?
>
> > > ___________________________
> > > Eng Khaled alHabache
> > >http://www.khelll.com
>
> > Ezra Zygmuntowicz
> > [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to