Forum: Ruby on Rails rfm working in localhost but not in production enviromen

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A1247f73598357f06388e863c41aa624?d=identicon&s=25 Elias Orozco (elioncho)
on 2009-03-20 17:06
(Received via mailing list)
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.
This topic is locked and can not be replied to.