On this page
After OpenClash updates from 0.47.156 to 0.48.002, the interface and version may look normal while startup stops at “Ruby dependency error; configuration file validation failed”. First locate the log and capture the complete error, then decide whether the dependency needs repair; core startup failures, subscription format errors, and missing Ruby packages follow different paths.
Confirm that the error stops at Ruby configuration validation
Official issue #5417 records OpenWrt R23.8.5-D on Linux arm64 reporting a Ruby dependency error during the v0.48.002 startup flow, while 0.47.156 ran normally. This article follows those conditions and does not attribute every startup failure to Ruby.
If the first log entry is invalid tun stack, a corrupt core file, a YAML syntax error, or a download failure, follow that error first. Save the OpenWrt version, device architecture, OpenClash version, Mihomo core version, and the first startup error.
Check whether ruby and ruby-yaml are available
The OpenClash v0.48.002 release page lists ruby and ruby-yaml among the manual-install dependencies. Having a ruby command does not prove that Ruby YAML is available; check the Ruby runtime and YAML loading in the router terminal, then inspect the package record.
Keep recoverable copies of the OpenClash configuration, subscription source, and custom overrides. Hide subscription tokens, node passwords, and the controller secret before sharing logs or configuration; do not update the core and subscription at the same time.
ruby -v
ruby -e 'require "yaml"; puts YAML::VERSION'
opkg list-installed | grep -E '^(ruby|ruby-yaml)'Reinstall the plugin after adding the official dependencies
On an opkg system, add ruby and ruby-yaml from the v0.48.002 release dependency list, then run the YAML check from the previous section again. Add other dependencies only when the device actually lacks them; do not delete configuration validation to hide the error.
Get the v0.48.002 package matching the device architecture from the official OpenClash release page and reinstall it with the configuration preserved. Do not mix an ipk for another architecture, an old core file, or a third-party modified package; start once and record only the next real error.
If the device has no SSH or terminal entry, perform the equivalent check in OpenWrt’s software-package page. Changing the plugin, core, and subscription together removes a clean rollback comparison.
Roll back and verify when it still fails
If ruby -e still cannot load YAML, or the same stage still fails after adding the dependencies, stop OpenClash and keep the complete log. Roll back with your saved 0.47.156 package or an officially verifiable older release and restore the previously working configuration; rollback restores service but does not make the old version safe long term.
After recovery, verify in order that OpenClash starts, the original configuration is selected, the core process is healthy, one proxy request appears in Connections or the log, and ordinary networking works after OpenClash stops. If it still fails, keep a redacted log, version record, and rollback package before asking for help.
Before you finish
- OpenWrt version and device architecture recorded
- ruby -v and require yaml both succeed
- OpenClash starts without a Ruby dependency error
- The configuration and core were checked separately
- A new request follows the expected policy, and direct access returns after OpenClash stops
- A redacted log and rollback package are kept if it still fails
