尝试在heroku上部署rails应用程序时出现此错误
Running: rake assets:precompile
rake aborted!
getaddrinfo: Name or service not known
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:112:in `getaddrinfo'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:112:in `connect'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/connection/ruby.rb:174:in `connect'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:263:in `establish_connection'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:69:in `connect'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:282:in `ensure_connected'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:173:in `block in process'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:248:in `logging'
/tmp/build_3bx0fu8vccj6s/vendor/bundle/ruby/1.9.1/gems/redis-3.0.2/lib/redis/client.rb:172:in `process'
答案 0 :(得分:0)
在heroku labs中启用User_env_compile
heroku labs:enable user-env-compile
然后重新部署您的应用程序。有关详情,请访问https://devcenter.heroku.com/articles/labs-user-env-compile