Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
uncommenting config.action_controller.session_store = :active_record_store in environment.rb
8 Posts
uncommenting config.action_controller.session_store = :active_record_store in environment.rb

hi... thanks evryone for ur replies... @Jon...

No, Nothing is available in logs like stack trace... Using console how to update sessions? Please tell me...

@ Nicolas...

I wanted database based sessions only.. because we used application based on sessions table, we retrieved session id and time from sessions table in database.

@ P Balduino

I tried that.. but it doesnt work...

@ Akhil...

I am able to view first page of my application. But when I click the second page link... I am getting the following page displayed.

The website cannot display the page HTTP 500
Most likely causes: The website is under maintenance. The website has a programming error.

What you can try:

 Refresh the page. 

 Go back to the previous page. 

 More information 

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

For more information about HTTP errors, see Help.

Can you all please help me...

Are you getting any Error/ Exception?

You can try, in environment.rb: config.action_controller.session = { :session_key => '_yourapp_session', :secret => '3dc2d8ba4dd29c7b229bed0f8e396ba7126a9e7d50b386aec2c3752030d5582a2cb22f84be3753d914fb7cf56b0ca8e8bfb4805b759b93f10ff4a2dc835abedd' }

When you say you uncommented config.action_controller.session_store = :active_record_store, does it mean it was commented with MySQL? if yes then why do you want to change the way session are stored (ie commented means cookie based session, uncommentd means database session)

OK, your next step is to be a bit more specific besides "my application doesnt work atall".

Is there anything in the logs, like a stack trace?

Also try creating / loading / updating Session objects in the console to see if you can narrow down the problem.

Hi Jon.. Thanks a lot for your reply... I searched for it...But I couldnt find the solution... :(

Hi Gouthami,

I've not used Oracle with Rails. Try googling for active_record_store oracle, I just read through a few pages with some promising suggestions.

Hi, I am a newbee to rubyonrails. I was given task of migration of database from mysql to oracle for a ror application.

My probelm is when I go into my environment.rb file and uncomment the;

config.action_controller.session_store = :active_record_store

my application doesnt work atall. I do have a sessions table but the sessions table data is not being updated with the latest data. Before this application was working with MySql database, it was working properly, but now am using oracle and its not working.

And if I comment it,

#config.action_controller.session_store = :active_record_store

the application is working fine but sessions are not used.I need sessions for my entire aplication. Can you please suggest how I should proceed?

8 Posts
Login to add your message