여기 내 문제 : Warbler는 gemfile에 경로를 통해 포함 된 보석을 지원하지 않습니다. 그럼에도 불구하고 나는 내 일을 위해 그것을 할 필요가있다. 포함 된 보석은 전쟁 아카이브에서 단순한 루비 보석으로 포장되고 취급되는 것이 중요합니다. 지금까지는 bundler를 조작하려고 시도했는데, 스펙이 warbler/traits/bundler.rb에 도착했을 때 (스펙이 아카이브에 압축되어있는 곳) 이미 소스로 Bundler :: Source :: Rubygems가 있습니다. 문제는 그 창문이 경로에서 빌드 및 설치가 필요하지만 그것은 어디에서나 경로 또는 소스에 전달할 수 없다는 것입니다. 이미 보석이 지어지고 설치되고 포장되어 루비 젬으로 포장되고 Lockfile의 GEM 아래에 열거되어 있지만 잘못된 코딩 만 있으면 작동합니다 (특정 보석에 대한 참조가 모두 있고 경로가 명확하게 입력되어 있음)Warbler : Path Gems에 대한 지원이 없습니다
여기내 코드 :
솔새/lib 디렉토리/솔새/특성/bunlder.rb 라인 : 60
case spec.source
when ::Bundler::Source::Git
config.bundler[:git_specs] ||= []
config.bundler[:git_specs] << spec
when ::Bundler::Source::Path
$stderr.puts("warning: Bundler `path' components are not currently supported.",
"The `#{spec.full_name}' component was not bundled.",
"Your application may fail to boot!")
else
##################################################################### MINE
if spec.name == "charla_common"
path = ::Bundler::GemHelper.new("../../common/trunk", spec.name).install_gem
end
##################################################################### MINE END
config.gems << spec
end
이 보석 경로를
Bundler를/lib 디렉토리/들러/DSL 설치되어있는 곳입니다 .rb 줄 : 120
def source(source, options = {})
############################################################### MINE
if source.class == Bundler::Source::Path
options[:path] = source.options["path"]
source = "https://rubygems.org"
end
############################################################### MINE END
case source
when :gemcutter, :rubygems, :rubyforge then
Bundler.ui.warn "The source :#{source} is deprecated because HTTP " \
"requests are insecure.\nPlease change your source to 'https://" \
"rubygems.org' if possible, or 'http://rubygems.org' if not."
@rubygems_source.add_remote "http://rubygems.org"
return
when String
# ensures that the source in the lockfile is shown only once
unless options[:prepend]
@rubygems_source.add_remiote source
end
return
else
@source = source
if options[:prepend]
@sources = [@source] | @sources
else
@sources = @sources | [@source]
end
yield if block_given?
return @source
end
ensure
@source = nil
end