Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Rails CredentialsNew to Visual Studio Code? Get it now.
Rails Credentials

Rails Credentials

Jarrett Lusso

|
395 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Rails Credentials Extension

Edit Rails encrypted credentials directly from VS Code by opening a credentials file and running the command. The extension launches rails credentials:edit with VS Code as the editor and opens the decrypted content in your editor window.

Features

  • Open config/credentials.yml.enc or environment-specific credentials (e.g. config/credentials/production.yml.enc) using the Rails command.
  • Choose whether decrypted credentials open in the current VS Code window or a new window.
  • Customize the Rails command if your project uses a different path or wrapper.

How it works

When you run the command, the extension:

  1. Detects the environment from the active file name (e.g. production.yml.enc).
  2. Spawns a terminal and runs the configured Rails command with EDITOR set to VS Code.
  3. Rails decrypts the credentials and opens them in VS Code for editing.

Requirements

  • Rails project with encrypted credentials.
  • Working Rails credentials setup (e.g. config/master.key or RAILS_MASTER_KEY set).
  • VS Code command-line launcher available as code in your PATH (see Command Line in VS Code).

Usage

  1. Open a Rails project in VS Code.
  2. Open a credentials file:
    • config/credentials.yml.enc
    • config/credentials/<environment>.yml.enc
  3. Run Rails Credentials from the Command Palette.

If the file does not end in .yml.enc, the command shows an error message.

Extension Settings

This extension contributes the following settings:

  • railsCredentials.command: Command to run. Default: bin/rails credentials:edit.
  • railsCredentials.openIn: Where to open the decrypted credentials.
    • railsCredentials.existingWindow (default): reuse the current window
    • railsCredentials.newWindow: open in a new window

Example

{
  "railsCredentials.command": "bin/rails credentials:edit",
  "railsCredentials.openIn": "railsCredentials.existingWindow"
}

Troubleshooting

  • Command not found: Ensure bin/rails (or your configured command) is executable and your project is open in VS Code.
  • VS Code doesn’t open the decrypted file: Verify the code command is available in your PATH (Command Palette → “Shell Command: Install 'code' command in PATH”).
  • Nothing happens: Make sure the active editor is a .yml.enc credentials file.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft