当我制作rails console
时,它给了我这个错误
WARNING: Spring is running in production. To fix this make sure the spring gem is only present in `development` and `test` groups in your Gemfile and make sure you always use `bundle install --without development test` in production
Loading production environment (Rails 5.2.4.3)
这是我在 Gemfile 中有 spring gem 的地方
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
这是我的 Dockerfile
FROM ruby:2.5.7
# prepare system
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
ENV RAILS_ENV production
ENV RACK_ENV production
# copy source
WORKDIR /app
COPY src/ /app/
# build
RUN bundle update
RUN bundle install --deployment --without development test
RUN bundle exec rake assets:precompile
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p" ,"3000"]
有什么建议么?