Skip to content

RTECO-1536 - Add jf ruby command for native RubyGems/Bundler support - #3574

Open
agrasth wants to merge 39 commits into
masterfrom
feature/rubygems-native-support
Open

RTECO-1536 - Add jf ruby command for native RubyGems/Bundler support#3574
agrasth wants to merge 39 commits into
masterfrom
feature/rubygems-native-support

Conversation

@agrasth

@agrasth agrasth commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Registers the jf ruby <gem|bundle> command in the JFrog CLI, wiring up the native RubyGems/Bundler support with full authentication, build-info collection, and Ghost Frog integration.

Depends on: jfrog/jfrog-cli-artifactory#499

What is included in this PR

  • Command registration: jf ruby with SkipFlagParsing: true for transparent arg passthrough
  • Flag extraction: --server-id, --repo, --build-name, --build-number, --module, --project consumed by jf; everything else forwarded to native tool
  • --repo flag: Specifies Artifactory repo name; jf constructs the full gems API URL from server config (no need to pass full URLs)
  • Ghost Frog integration: gem/bundle aliases route through jf ruby <tool>
  • Help documentation: Usage examples including --repo shorthand
  • Integration tests: Version passthrough, help bypass, unsupported tool errors, no-args error, --repo stripping

Usage examples

# Bundle install (auto-discovers source from Gemfile)
jf ruby bundle install

# Gem install with --repo (URL constructed from server config)
jf ruby gem install rake --repo gems-virtual

# Gem push with --repo
jf ruby gem push my.gem --repo gems-local --build-name=build --build-number=1

# Explicit --source (traditional way still works)
jf ruby gem install rake --source https://my.jfrog.io/artifactory/api/gems/gems-virtual/

# With explicit server selection
jf ruby bundle install --server-id my-rt --repo gems-virtual

Test plan

  • go build ./... - compiles with local replaces
  • Integration tests pass (go test -run TestRuby)
  • End-to-end with live Artifactory gems repos

Wires the native RubyGems/Bundler support into the JFrog CLI:

- Register `jf ruby` command in buildtools/cli.go with SkipFlagParsing
- RubyCmd handler: extracts native tool, server-id, build details, delegates
  to RubyCommand via ExecWithPackageManager
- Add Ruby flag set (BuildName, BuildNumber, module, Project, serverId)
- Add docs/buildtools/rubycommand/help.go with usage examples
- Route gem/bundle through `jf ruby` in packagealias/dispatch.go (Ghost Frog)
- Add 5 integration tests (version passthrough, help bypass, error handling)

Note: go.mod contains local replace directives for build-info-go and
jfrog-cli-artifactory (development only, to be replaced at merge time).

Co-authored-by: Cursor <cursoragent@cursor.com>
@agrasth agrasth changed the title Add jf ruby command for native RubyGems/Bundler support RTECO-1536 - Add jf ruby command for native RubyGems/Bundler support Jun 29, 2026
The --repo flag specifies an Artifactory repository name and lets jf
construct the full gems API URL from the server config, so users do not
need to pass full Artifactory URLs for gem install/push commands.

Also updates help text with --repo examples and adds integration test.

Co-authored-by: Cursor <cursoragent@cursor.com>
Integration tests for gem install/fetch/push, bundle install, build-info
capture, checksums, scope classification, and round-trip flows.
All tests auto-skip unless explicitly enabled with -test.ruby=true,
so CI remains unaffected.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds rubyTests.yml following the same pattern as nixTests/uvTests:
- Sets up Ruby 3.2 via ruby/setup-ruby
- Spins up local Artifactory
- Runs `go test --test.ruby`
- Supports external Artifactory via workflow_dispatch inputs

Co-authored-by: Cursor <cursoragent@cursor.com>
…tive-support

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	go.sum
#	main_test.go
#	utils/tests/consts.go
#	utils/tests/utils.go
Points build-info-go and jfrog-cli-artifactory replace directives to
their feature branch commits on GitHub, so CI can resolve dependencies
without local checkouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
- ruby_integration_test.go: suppress G703 path traversal on test-only
  WriteFile (path always comes from CreateTempDir)
- buildtools/cli.go: rewrite if-else chain to switch in
  extractRubyRepoFromArgs to satisfy gocritic

Co-authored-by: Cursor <cursoragent@cursor.com>
Required by the CI static analysis check that verifies all registered
commands expose AI-consumable descriptions via ResolveDescription.

Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 4 commits July 16, 2026 02:36
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Integration tests now call prepareHomeDir(t) via initRubyTest to
ensure the JFrog server config is available (fixes "Invalid uri scheme"
errors from missing ArtifactoryUrl). Also updates jfrog-cli-artifactory
dependency to include the reference token auth fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
Integration tests now call prepareHomeDir(t) via initRubyTest to
ensure the JFrog server config is available (fixes "Invalid uri scheme"
errors from missing ArtifactoryUrl). Also updates jfrog-cli-artifactory
dependency to include the reference token auth fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 2 commits July 16, 2026 03:18
Bundler lockfile fixtures caused "unreadable lockfile" errors in CI
due to version mismatches and unpatched placeholder URLs. Removing
them lets bundler generate a fresh lockfile during tests.

Also updates jfrog-cli-artifactory dep to include the fix that
errors on invalid --server-id instead of silently falling through.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bundler lockfile fixtures caused "unreadable lockfile" errors in CI
due to version mismatches and unpatched placeholder URLs. Removing
them lets bundler generate a fresh lockfile during tests.

Also updates jfrog-cli-artifactory dep to include the fix that
errors on invalid --server-id instead of silently falling through.

Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 2 commits July 16, 2026 03:28
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 2 commits July 16, 2026 03:36
Bundler env var credential matching varies across versions and port
handling. Embedding credentials directly in the source URL is the
most reliable approach for CI, matching how gem install works.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bundler env var credential matching varies across versions and port
handling. Embedding credentials directly in the source URL is the
most reliable approach for CI, matching how gem install works.

Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 2 commits July 16, 2026 20:56
Generic jf rt upload doesn't trigger Artifactory gem index generation.
Use jf ruby gem push which hits the RubyGems API endpoint (POST
/api/gems/<repo>) and properly triggers specs.4.8.gz creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Generic jf rt upload doesn't trigger Artifactory gem index generation.
Use jf ruby gem push which hits the RubyGems API endpoint (POST
/api/gems/<repo>) and properly triggers specs.4.8.gz creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth and others added 5 commits July 16, 2026 22:47
Artifactory generates specs.4.8.gz asynchronously after gem push API
call. Add a wait to give it time to complete before bundle tests
request the index.

Co-authored-by: Cursor <cursoragent@cursor.com>
The virtual repo's specs.4.8.gz depends on both the local repo
(gem push) AND the remote repo (lazy sync from rubygems.org).
Replace the fixed 10s sleep with polling (up to 60s, 5s intervals)
that verifies the index is actually available before proceeding
with bundle tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
1. warmUpRubyVirtualRepo now uses sync.Once so the expensive polling
   (push gem + poll specs.4.8.gz) runs only once across all tests.
   Increased timeout to 120s for slow CI Artifactory instances.

2. TestRubyBuildFlags: name-only and number-only cases now correctly
   expect an error (CLI rejects partial build-name/build-number).

Co-authored-by: Cursor <cursoragent@cursor.com>
The CI Artifactory instance does not generate specs.4.8.gz for
virtual repos (confirmed after multiple attempts with polling up to
120s). This is an infrastructure limitation, not a code bug.

Fix: Bundle tests now use the LOCAL repo directly with a self-contained
'warmup' gem. The local repo generates specs immediately on gem push.
gem install/fetch tests still use the virtual repo (which works fine
for individual gem operations that don't need specs.4.8.gz).

Co-authored-by: Cursor <cursoragent@cursor.com>
…tive-support

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	ruby_integration_test.go
The artifactory pin was still at f58023d, which predated the checksum
provenance fix and every subsequent RubyGems change, so this branch built
`jf ruby` against known-broken behaviour.

Both replace directives are now plain requires. build-info-go no longer needs
one here at all: jfrog-cli-artifactory requires the version it needs directly,
so minimal version selection carries it, whereas a replace in a dependency is
ignored and silently resolved to an older commit.

Picks up, from jfrog-cli-artifactory:
  - jf setup ruby writes a Bundler mirror, so an unmodified Gemfile resolves
    through Artifactory with no edit
  - bare `gem install` can authenticate at all, which previously failed 401
  - Bundler credential keys correct for dashed and ported hosts
  - Artifactory credentials no longer sent to unrelated gem hosts
  - `gem push` no longer falls back to rubygems.org
  - AQL enrichment no longer mixes a checksum and a path from different files
Picks up the RubyGems fixes verified against a live instance:

  - plain `gem install` works at all: the ~/.gemrc source now ends in a slash,
    without which RubyGems dropped the repository name from its index request
  - https://rubygems.org no longer sits ahead of Artifactory in ~/.gemrc, so
    setup actually takes effect for bare gem commands
  - the Gemfile is resolved the way Bundler resolves it, honouring
    $BUNDLE_GEMFILE and parent directories, so commands run from a subdirectory
    no longer fail with a bare "exit status 16"
  - module IDs come from the gemspec instead of the working directory name or
    the subcommand, so they are stable across machines
  - `gem build` records the dependencies it was built against, read from
    Gemfile.lock
  - artifact paths match where the gem actually landed
  - global flags before the subcommand, and a "--" separator, no longer cause
    auth and build-info to be skipped silently
  - interrupting `gem push` no longer leaves the Artifactory token on disk
  - empty dependency enrichment warns instead of passing for success
…tive-support

# Conflicts:
#	buildtools/cli.go
#	go.mod
#	go.sum
#	main_test.go
#	utils/cliutils/commandsflags.go
#	utils/tests/consts.go
#	utils/tests/utils.go
Static Check and Go-Sec both flagged the repository warm-up helper. The request
method and status code now use the http package constants rather than string and
numeric literals, and the response body close is asserted instead of ignored.

Also bumps jfrog-cli-artifactory to pick up the missing Ruby entry in
packageManagerConfigs, without which the setup tests fail there.
The RubyGems FlexPack branch now contains build-info-go's main, so its
pseudo-version is newer and an ordinary require selects it. The replace
directive added to pin backwards is no longer needed.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🚨 Frogbot scanned this pull request and found the below:

📗 Scan Summary

  • Frogbot scanned for vulnerabilities and found 4 issues
Scan Category Status Security Issues
Software Composition Analysis ✅ Done
1 Issues Found 1 High
Contextual Analysis ✅ Done -
Static Application Security Testing (SAST) ✅ Done
3 Issues Found 3 Low
Secrets ✅ Done Not Found
Infrastructure as Code (IaC) ✅ Done Not Found

📦 Vulnerable Dependencies

Severity ID Contextual Analysis Dependency Path
high
High
GHSA-hrxh-6v49-42gf Not Covered
1 Directgoogle.golang.org/grpc:1.81.1

🔖 Details

Vulnerability Details

CVSS V3: -
Dependency Path:
google.golang.org/grpc: 1.81.1 (Direct)

Multiple security vulnerabilities have been identified and addressed in grpc-go affecting the xDS RBAC authorization engine (internal/xds/rbac) and the HTTP/2 transport server implementation (internal/transport). These vulnerabilities could result in:

  • Authorization Bypass (Fail-Open) when translating xDS RBAC policies containing Metadata or RequestedServerName fields.
  • Denial of Service (High CPU Consumption) due to an HTTP/2 Rapid Reset mitigation bypass during client-initiated stream resets.
  • Denial of Service (Server Panic) when parsing crafted xDS RBAC policies containing NOT rules around unsupported fields.

Impact

What kind of vulnerability is it? Who is impacted?

xDS RBAC Authorization Bypass via Metadata & RequestedServerName matchers

  • Affected Component: xDS RBAC
  • Impact: When building policy matchers for gRPC RBAC from xDS configurations, unsupported permission and principal rules (specifically Metadata and RequestedServerName) were silently ignored and treated as no-ops.
    • If an authorization policy relied purely on these matchers for access control, treating those rules as no-ops effectively removed the restrictions.
  • If these unsupported rules were nested inside logical NOT rules (Permission_NotRule / Principal_NotId) or multi-condition OR/AND rules, silently dropping them changed the boolean logic flow of the authorization engine.

As a result, policy evaluation decisions could fail open, allowing unauthorized clients to access protected gRPC services or resources.

HTTP/2 Rapid Reset Mitigation Bypass / Denial of Service via Stream Aborts

  • Affected Component: HTTP/2 transport
  • Impact: Earlier mitigations in grpc-go for HTTP/2 Rapid Reset only applied threshold checks to items that directly resulted in control frames being written back to the wire, such as SETTINGS ACKs or server-initiated RST_STREAMs.

When a client initiated a rapid flood of stream creation (HEADERS) immediately followed by stream termination RST_STREAM, items queued up in the control buffer without counting against the transport response frame threshold. An attacker can repeatedly trigger this flood sequence to bypass reader blocking, resulting in high CPU usage, and Denial of Service (DoS).

Denial of Service (Panic) in xDS RBAC Engine via Unsupported Fields inside NOT Rules

  • Affected Component: xDS RBAC
  • Impact: The xDS RBAC policy translators recursively generate matchers for nested rules. When a NOT rule wrapped an unsupported or unhandled field (such as SourcedMetadata), the recursive step returned an empty matcher. This could result in a runtime panic when the RBAC engine attempts to authorize an incoming request.

An attacker or misconfigured/malicious xDS management server delivering an LDS/RDS update containing a NOT rule around an unhandled field causes the gRPC server process to crash immediately (CWE-248 / Denial of Service).

Patches

Has the problem been patched? What versions should users upgrade to?

All three issues have been fixed in master and will be released in 1.82.1 shortly.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

If upgrading grpc-go immediately is not possible, apply the following workarounds based on your deployment architecture:

  • For xDS RBAC Vulnerabilities & Panics: Ensure that upstream xDS management servers do not push RBAC policies containing Metadata, RequestedServerName, or NOT rules wrapping unsupported fields (such as SourcedMetadata) to grpc-go servers.
  • For HTTP/2 Rapid Reset DOS: Configure upstream reverse proxies or load balancers (such as Envoy) with strict HTTP/2 max_concurrent_streams limits and active rate limiting on RST_STREAM frequency per connection.

Severity

Vulnerability Qualitative Severity Approximate CVSS v3.1 Score Primary Impact
xDS RBAC Authorization Bypass High 8.2 Unauthorized Access / Fail-Open
HTTP/2 Rapid Reset DOS Bypass High 7.5 High CPU Consumption / Denial of Service
xDS RBAC Engine Server Panic Medium 5.9 Process Crash / Denial of Service

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
NpmLocalRepositoryConfig

at utils/tests/consts.go (line 96)

🎯 Static Application Security Testing (SAST) Vulnerability

Severity Finding
low
Low
Credentials for restricted resources included directly in source code
Full description

Vulnerability Details

Rule ID: go-hardcoded-credentials

Overview

Hardcoded credentials are usernames, passwords, API keys, or other secrets
embedded directly in source code. This practice, identified by CWE-798, is
highly insecure because it makes it easy for anyone with access to the code to
discover and misuse the credentials. If the code is publicly released, shared,
or leaked, the credentials will be exposed to unauthorized parties.

Vulnerable example

In this example, the database username and password for the frog pond are
hardcoded directly in the source code as string literals. This is a major
security risk, as anyone who can read this file can steal the credentials and
gain unauthorized access to the database.

package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// VULNERABLE: Hardcoded database credentials for the frog pond.
	frogUser := "pond_admin"
	frogPassword := "LeapFlog123!"
	pondName := "lilypad_db"

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}

Remediation

The remediated code retrieves the database credentials from environment
variables instead of hardcoding them. This is a much more secure approach, as
it separates the secrets from the source code. This allows credentials to be
managed securely by deployment systems and rotated without changing the code.

package main

import (
	"database/sql"
	"fmt"
	"log"
	"os"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// SECURE: Retrieve credentials from environment variables.
	frogUser := os.Getenv("FROG_DB_USER")
	frogPassword := os.Getenv("FROG_DB_PASS")
	pondName := os.Getenv("FROG_DB_NAME")

	if frogUser == "" || frogPassword == "" || pondName == "" {
		log.Fatal("DB credentials are not set in environment variables.")
	}

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}



@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
NpmLocalScopedRespositoryConfig

at utils/tests/consts.go (line 97)

🎯 Static Application Security Testing (SAST) Vulnerability

Severity Finding
low
Low
Credentials for restricted resources included directly in source code
Full description

Vulnerability Details

Rule ID: go-hardcoded-credentials

Overview

Hardcoded credentials are usernames, passwords, API keys, or other secrets
embedded directly in source code. This practice, identified by CWE-798, is
highly insecure because it makes it easy for anyone with access to the code to
discover and misuse the credentials. If the code is publicly released, shared,
or leaked, the credentials will be exposed to unauthorized parties.

Vulnerable example

In this example, the database username and password for the frog pond are
hardcoded directly in the source code as string literals. This is a major
security risk, as anyone who can read this file can steal the credentials and
gain unauthorized access to the database.

package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// VULNERABLE: Hardcoded database credentials for the frog pond.
	frogUser := "pond_admin"
	frogPassword := "LeapFlog123!"
	pondName := "lilypad_db"

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}

Remediation

The remediated code retrieves the database credentials from environment
variables instead of hardcoding them. This is a much more secure approach, as
it separates the secrets from the source code. This allows credentials to be
managed securely by deployment systems and rotated without changing the code.

package main

import (
	"database/sql"
	"fmt"
	"log"
	"os"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// SECURE: Retrieve credentials from environment variables.
	frogUser := os.Getenv("FROG_DB_USER")
	frogPassword := os.Getenv("FROG_DB_PASS")
	pondName := os.Getenv("FROG_DB_NAME")

	if frogUser == "" || frogPassword == "" || pondName == "" {
		log.Fatal("DB credentials are not set in environment variables.")
	}

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}



@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
NpmRemoteRepositoryConfig

at utils/tests/consts.go (line 98)

🎯 Static Application Security Testing (SAST) Vulnerability

Severity Finding
low
Low
Credentials for restricted resources included directly in source code
Full description

Vulnerability Details

Rule ID: go-hardcoded-credentials

Overview

Hardcoded credentials are usernames, passwords, API keys, or other secrets
embedded directly in source code. This practice, identified by CWE-798, is
highly insecure because it makes it easy for anyone with access to the code to
discover and misuse the credentials. If the code is publicly released, shared,
or leaked, the credentials will be exposed to unauthorized parties.

Vulnerable example

In this example, the database username and password for the frog pond are
hardcoded directly in the source code as string literals. This is a major
security risk, as anyone who can read this file can steal the credentials and
gain unauthorized access to the database.

package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// VULNERABLE: Hardcoded database credentials for the frog pond.
	frogUser := "pond_admin"
	frogPassword := "LeapFlog123!"
	pondName := "lilypad_db"

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}

Remediation

The remediated code retrieves the database credentials from environment
variables instead of hardcoding them. This is a much more secure approach, as
it separates the secrets from the source code. This allows credentials to be
managed securely by deployment systems and rotated without changing the code.

package main

import (
	"database/sql"
	"fmt"
	"log"
	"os"

	_ "[github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)"
)

func main() {
	// SECURE: Retrieve credentials from environment variables.
	frogUser := os.Getenv("FROG_DB_USER")
	frogPassword := os.Getenv("FROG_DB_PASS")
	pondName := os.Getenv("FROG_DB_NAME")

	if frogUser == "" || frogPassword == "" || pondName == "" {
		log.Fatal("DB credentials are not set in environment variables.")
	}

	connStr := fmt.Sprintf("%s:%s@tcp(127.0.0.1:3306)/%s",
		frogUser, frogPassword, pondName)

	lilypadDB, err := sql.Open("mysql", connStr)
	if err != nil {
		log.Fatalf("Error opening database: %v", err)
	}
	defer lilypadDB.Close()

	err = lilypadDB.Ping()
	if err != nil {
		log.Fatalf("Error pinging database: %v", err)
	}
	fmt.Println("Successfully connected to the frog pond.")
}



Picks up the fix for resolving the RubyGems and Bundler configuration home,
which on Windows is $HOME rather than the %USERPROFILE% that os.UserHomeDir
reports. Without it, jf setup ruby wrote ~/.gemrc and ~/.bundle/config where
neither gem nor bundle reads them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant