Skip to content

ruby gem spring is required by command bin/rails, even in production environment #3316

@nicolasfranck

Description

@nicolasfranck

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

4.0.1

Expected behaviour:

In a production environment environment, gems from groups like development
are typically not installed, and should not be relied on. I even add the environment variable
EXECJS_RUNTIME=Disabled to ensure that rails does not try to compile assets or start
an asset compiler.

Actual behaviour:

If you have run bundle install with the following configuration ..

bundle config without test development ci

then the rails command fails with the following error:

$ bundle exec rails server
/usr/local/bundle/gems/bundler-2.4.8/lib/bundler/rubygems_integration.rb:280:in `block (2 levels) in replace_gem': spring is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
	from /opt/roadmap/bin/spring:14:in `<top (required)>'
	from bin/rails:7:in `load'
	from bin/rails:7:in `<main>'

If I removed the lines that try to load spring, then the command works again

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions