What does this Cucumber error message mean?

2019-06-09 13:52发布

问题:

I run cucumber features and get:

Using the default profile...

can't activate builder (~> 2.1.2, runtime) for 
    ["activemodel-3.0.5", "actionpack-3.0.5", "railties-3.0.5"],
already activated builder-3.0.0 for
    ["cucumber-0.10.2"] (Gem::LoadError)

What is wrong here and how can I fix it? Thanks.

回答1:

It means you have builder 3.0.0 installed and loaded while rails needs 2.1.x.

Try

$ gem uninstall builder

followed by

$ bundle

(assuming you're using bundler).

If you're not, do

$ gem install builder --version "<2.2"

HTH.