我正在尝试设置我的 rails 应用程序,以按照这些说明使用asset_sync gem将其资产上传到亚马逊的AWS S3 。我知道我的 S3 配置正确,因为我的应用程序能够将图像上传到 S3。我很确定我的所有设置都是正确的:
FOG_DIRECTORY => mybucketname
FOG_PROVIDER => AWS
FOG_REGION => s3-us-west-2
但是我不断收到错误消息:
-bash> heroku run rake assets:precompile --remote staging
Running rake assets:precompile attached to terminal... up, run.1
AssetSync: using default configuration from built-in initializer
mkdir -p /app/public/assets
...
mkdir -p /app/public/assets
AssetSync: Syncing.
rake aborted!
getaddrinfo: Name or service not known # <-- error
在本地编译会产生稍微不同的错误:
-bash> bundle exec rake assets:precompile
AssetSync: using default configuration from built-in initializer
mkdir -p /Users/bart/Dev/MyApp/myapp/public/assets
...
mkdir -p /Users/bart/Dev/MyApp/myapp/public/assets
AssetSync: Syncing.
rake aborted!
getaddrinfo: nodename nor servname provided, or not known # <-- error