diff --git a/AutoRest/Generators/Ruby/Azure.Ruby/AzureRubyCodeGenerator.cs b/AutoRest/Generators/Ruby/Azure.Ruby/AzureRubyCodeGenerator.cs index eb0360700b..b70c7463d5 100644 --- a/AutoRest/Generators/Ruby/Azure.Ruby/AzureRubyCodeGenerator.cs +++ b/AutoRest/Generators/Ruby/Azure.Ruby/AzureRubyCodeGenerator.cs @@ -148,7 +148,7 @@ public override async Task Generate(ServiceClient serviceClient) { Model = new VersionTemplateModel(packageVersion), }; - await Write(versionTemplate, "version" + ImplementationFileExtension); + await Write(versionTemplate, Path.Combine(sdkPath, "version" + ImplementationFileExtension)); } // Module Definition File diff --git a/AutoRest/Generators/Ruby/Ruby/RubyCodeGenerator.cs b/AutoRest/Generators/Ruby/Ruby/RubyCodeGenerator.cs index f8c198f9eb..3e3a7fdc8c 100644 --- a/AutoRest/Generators/Ruby/Ruby/RubyCodeGenerator.cs +++ b/AutoRest/Generators/Ruby/Ruby/RubyCodeGenerator.cs @@ -209,7 +209,7 @@ await Write(enumTemplate, { Model = new VersionTemplateModel(packageVersion), }; - await Write(versionTemplate, "version" + ImplementationFileExtension); + await Write(versionTemplate, Path.Combine(sdkPath, "version" + ImplementationFileExtension)); } // Module Definition File diff --git a/AutoRest/Generators/Ruby/Ruby/TemplateModels/RequirementsTemplateModel.cs b/AutoRest/Generators/Ruby/Ruby/TemplateModels/RequirementsTemplateModel.cs index a1dca5692d..d38a1b73b7 100644 --- a/AutoRest/Generators/Ruby/Ruby/TemplateModels/RequirementsTemplateModel.cs +++ b/AutoRest/Generators/Ruby/Ruby/TemplateModels/RequirementsTemplateModel.cs @@ -202,7 +202,7 @@ public virtual string GetDependencyGems() { requirements = requirements + Environment.NewLine - + string.Format(CultureInfo.InvariantCulture, "require '{0}/version'", GeneratedFolderName); + + string.Format(CultureInfo.InvariantCulture, "require '{0}/{1}/version'", GeneratedFolderName, this.sdkName); } return requirements;