为什么我从Bundler看到此警告消息?

时间:2014-05-19 12:43:18

标签: ruby-on-rails bundler gemfile

我在我的Rails应用程序中包含一些本地引擎到应用程序的Gemfile

# In the Gemfile...
# Bundles an internal engine from ./engines into the Gemfile and
# loads the engine's dependencies from the .gemspec file
def load_engine(gem_name, dirname = nil)
  dirname ||= gem_name
  # Load the engine into the app
  gem gem_name, path: "engines/#{dirname}"
  # Include the engine's dependencies
  gemspec path: "engines/#{dirname}/"  
end

# Load engines
load_engine('engine_one')
load_engine('engine_two')

当我运行bundle命令时,我在控制台中收到以下警告:

Your Gemfile lists the gem engine_one (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem engine_two (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.

有人能解释一下这里发生了什么吗?

0 个答案:

没有答案