Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4125512
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:52:45+00:00 2026-05-20T23:52:45+00:00

I’m pretty new to rails. I have a login system where, if data entered

  • 0

I’m pretty new to rails. I have a login system where, if data entered is valid, session[:user] is set. However, when later in ApplicationController I refer to session[:user] it will always give me an error, no matter the context, unless the line is commented out. Example:

user = session[:user]

The error it gives me is a generic “not working at this time” error, it doesn’t actually say what’s wrong.

Edit: Here’s the error. It’s a generic one.

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

Also I tried many different variants and no matter what I stored in there it still gave me the error, it seemed. Here’s my code:

Login processing:

session[:name] = valid_user.name
session[:password] = valid_user.password

Session validation (on every page view):

name = session[:name]
pass = session[:password]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:52:46+00:00Added an answer on May 20, 2026 at 11:52 pm

    Ok, a few things:

    1. You need to take your app out of production mode — that’s why you’re getting this useless error message. Set to development mode or read your server log and you should get a more verbose and useful error message. ( See this question for related discussion, just set it to development instead of setting it to production as that asker was doing )

    2. Don’t store the user object in session, and DEFINITELY don’t store the password in session. You should only store the user id, then do something like this:

      user = User.find_by_id(session[:user_id]
      
    3. After you share the more verbose error message I can try to help you more, but most likely the error is you are asking for some session parameter that is undefined. The verbose error message will tell you what and where, but in the mean time check carefully to make sure you never ask for a session value when it hasn’t been set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.