-
Notifications
You must be signed in to change notification settings - Fork 59
Replicate does not seem to work with Rails 4.2.3 and Ruby 2.2.2 #40
Comments
Any update on this? @rtomayko can you please help ? |
Hmm, yeah it looks like redis_config is nil. Maybe try |
Thanks @rtomayko for the quick response. My bad for the typo. After giving RAILS_ENV=production, I get the following error. Do I need to explicitly give dump_replicants for each AR class? I thought replicate gem handles that automatically? /var/www/fbdash/shared/bundle/ruby/2.2.0/gems/replicate-1.5.1/lib/replicate/dumper.rb:85:in |
it requires to declare this method on all models,
but for some reason, the data being exported and imported without values. |
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:
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.
The text was updated successfully, but these errors were encountered: