# Weird connection/cache-problem in Rails

**URL:** <https://www.ruby-forum.com/t/weird-connection-cache-problem-in-rails/49857>\
**Category:** Ruby\
**Created:** [December 9, 2005, 12:15pm UTC](https://www.ruby-forum.com/t/weird-connection-cache-problem-in-rails/49857 "2005-12-09T12:15:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beakid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3e96dc/32.png) [@beakid](https://www.ruby-forum.com/u/beakid)\
**Post date:** [December 9, 2005, 12:15pm UTC](https://www.ruby-forum.com/t/weird-connection-cache-problem-in-rails/49857/1 "2005-12-09T12:15:00Z")

</div>

Hi all!

Does anyone know the solution to this weird problem/bug in Rails?  
(alternate link: [http://rafb.net/paste/results/82f7Wc85.html](http://rafb.net/paste/results/82f7Wc85.html) )

* * *

#in my helper

#this is a ruby module we created that can open a directory via samba  
using login & password  
require ‘testlogin’

output = “Login with Admin: " + Testlogin.testlogin(”“, “Admin”,  
“admin”, “smb://10.168.1.133/Data”).to\_s + “  
”  
output += “Login with Admin: " + Testlogin.testlogin(””, “Admin”,  
“admin”, “smb://10.168.1.133/Data”).to\_s + “  
”  
output += “Login with Wrong: " + Testlogin.testlogin(”“, “Wrong”,  
“admin”, “smb://10.168.1.133/Data”).to\_s + “  
”  
output += “Login with Admin: " + Testlogin.testlogin(””, “Admin”,  
“admin”, “smb://10.168.1.133/Data”).to\_s

#in my view, i get this result  
Login with Admin: 1  
Login with Admin: 1  
Login with Wrong: 0  
Login with Admin: 0

If i run the Testlogin in the terminal it works as aspected (returning  
1,1,0,1).  
It seems something (rails? samba?) stores the samba-connection if the  
login fails.

Seems to be a bug somewhere, right? Anyone have an idea?
