Rfm working in localhost but not in production enviromen


#1

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.