运行带有docker和docker-compose的rails应用程序时出现此错误错误连接到127.0.0.1:6379上的Redis(Errno :: ECONNREFUSED)
请找到我的Docker文件
# Copy the Gemfile as well as the Gemfile.lock and install
# the RubyGems. This is a separate step so the dependencies
# will be cached unless changes to one of those two files
# are made.
COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle install --jobs 20 --retry 5
# Copy the main application.
COPY . ./app
# Expose port 3000 to the Docker host, so we can access it
# from the …Run Code Online (Sandbox Code Playgroud) 我想使用活动记录的单个查询更新多行。我不必使用 update_all 因为它跳过验证。有什么办法可以在 Rails 活动记录中做到这一点。?