ex. 10.10.10.10 ) ( Rails + Apache2 + Mysql ) and during heavy periods
we startup a second application server that just handle the Rails
The second application server ( ex. 188.8.131.52 ) connects to the mysql
of the mainappserver as specified in the database.yml :
Now everytime I'm running a rake tasks or a rails command ( ex. rails
console production ) I get the following error :
Access denied for user 'appuser'@'184.108.40.206' (using password: YES)
It is strange that he is not connecting to the database specified in the
database.yml file. After some research I figured out that one of my
custom plugins is causing the problem. The problem is comming from the
initializer of the plugin where I do :
We need to use the config.to_prepare because we want that it only loads
1 time when it is the production environment and reload everytime in
development mode. In load_fianet we do a class_eval on a model to add
some specific methods.
If I delete this code, the rake tasks and rails commands are working
fine. How does it come that he is not taking the normal database.yml at
this point? It is for the moment also unclear from where he gets the
220.127.116.11 host address to connect to. It is nowhere specified.
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.