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 hitting http://localhost:4000/application/name i 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 hitting http://localhost:4000/application/what i get:
Could not retrieve session from Merb::MemcacheSession: undefined method
`retrieve_session' for nil:NilClass
Here are the settings in my init.rb
# Go to http://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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---