# Rfm working in localhost but not in production enviromen

**URL:** <https://www.ruby-forum.com/t/rfm-working-in-localhost-but-not-in-production-enviromen/163465>\
**Category:** Rails\
**Created:** [March 20, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/rfm-working-in-localhost-but-not-in-production-enviromen/163465 "2009-03-20T17:06:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [March 20, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/rfm-working-in-localhost-but-not-in-production-enviromen/163465/1 "2009-03-20T17:06:42Z")

</div>

Hi Guys,

We’ve been using RFM to sync to a FMP server. As we were deploying the  
app to the production server, we encountered a small problem in this  
part of the code:

In enviroment.rb:

SERVER\_CONFIG = {  
:host =\> “my.ip.number”,  
:account\_name =\> “user”,  
:password =\> “pass”  
}  
DATABASE = “my\_database”

In the controller I have this:  
if(Rfm::Server.new(SERVER\_CONFIG)[DATABASE][“template”].find  
({“user\_id” =\> current\_user.id})[0] != nil)  
puts “the user do exist”  
else  
puts “the user does not exist”  
end

When working in localhost the sync works fine, but when I have the  
Rails Application is on the production server(hosted at slicehost with  
ubuntu on it) it shows this error in the “if()” line:

NoMethodError: You have a nil object when you didn’t expect it! The  
error occurred while evaluating nil.record\_entity\_expansion

We are not sure if this is a server permission problem or a config  
thing. Any help would be greatly appreciated.
