You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Hi, Replicate gem looks awesome and seems the right thing for selectively copying data from prod to my devel db. However, either I am not following the steps correctly or replicate does not work with Rails 4.2.3. In either case, will appreciate your help. Here is what I did:
Added gem 'replicate' to my Gemfile
Added a config/replicate/dump.rb file that requires 'config/environment' and added simple code to dump Company.find(16)
Ran the following command on my production DB machine:
RAILS_ENV=prod replicate -r ./config/environment -d config/replicate/dump.rb > dumped_data
When I do this, I get the following error:
/var/www/fbdash/releases/20151124123929/config/application.rb:47:in <class:Application>': undefined method[]' for nil:NilClass (NoMethodError)
from /var/www/fbdash/releases/20151124123929/config/application.rb:17:in <module:AdIQ>' from /var/www/fbdash/releases/20151124123929/config/application.rb:16:in<top (required)>'
from /var/www/fbdash/releases/20151124123929/config/environment.rb:2:in `require'
My application.rb snippet looks like this:
...
LIne 46: redis_config = YAML.load_file(Rails.root + 'config/redis.yml')[Rails.env]
Line 47: url_prefix = redis_config['url_prefix']
db = redis_config['cache_db']
I am not sure why it is not picking redis_config as the prod app works just fine.