---
title: "Local Development: Ruby, .NET and Rust"
description: "Run Ruby on Rails, ASP.NET Core and Rust apps locally with secrets from Ennote instead of a .env file, by starting them with ennote secret get."
canonical_url: "https://docs.ennote.io/guides/local-development/more-languages"
---
# Local Development: Ruby, .NET and Rust

> Run Ruby on Rails, ASP.NET Core and Rust apps locally with secrets from Ennote instead of a .env file, by starting them with ennote secret get.

The pattern is the same in every language: put `ennote secret get "<secret>" --` in front of the command that starts your app, and read the values as environment variables.

The examples use a secret named `api-env`. Set your organization and workspace once with [`ennote config set`](https://docs.ennote.io/cli/commands/config), or add `--organization-id` and `--workspace-id` flags as in the [overview](https://docs.ennote.io/guides/local-development/overview#sharing-the-command-with-your-team).

## Ruby on Rails

```bash
ennote secret get "api-env" -- bin/rails server
```

If you use `bin/dev` to start several processes, start it through Ennote and every process inherits the variables:

```bash
ennote secret get "api-env" -- bin/dev
```

Read values with `ENV`:

```ruby [config/initializers/stripe.rb]
Stripe.api_key = ENV.fetch("STRIPE_SECRET_KEY")
```

A key named `DATABASE_URL` is used by Active Record automatically. `ENV.fetch` raises an error when a key is missing, so a misconfigured secret fails at start-up instead of later.

## ASP.NET Core and .NET

```bash
ennote secret get "api-env" -- dotnet run
ennote secret get "api-env" -- dotnet watch
```

The default configuration reads environment variables, and a double underscore (`__`) stands for the `:` separator. Name the keys of your Ennote secret accordingly:

<table>
<thead>
  <tr>
    <th>
      Key in Ennote
    </th>
    
    <th>
      Configuration key
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ConnectionStrings__Default
      </code>
    </td>
    
    <td>
      <code>
        ConnectionStrings:Default
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Stripe__SecretKey
      </code>
    </td>
    
    <td>
      <code>
        Stripe:SecretKey
      </code>
    </td>
  </tr>
</tbody>
</table>

```csharp [Program.cs]
var connectionString = builder.Configuration.GetConnectionString("Default");
var stripeKey = builder.Configuration["Stripe:SecretKey"];
```

This replaces local `appsettings.Development.json` secrets and .NET User Secrets.

## Rust

```bash
ennote secret get "api-env" -- cargo run
```

With live reload through [bacon](https://github.com/Canop/bacon) or `cargo watch`, start the watcher through Ennote:

```bash
ennote secret get "api-env" -- bacon run
```

Read values with `std::env::var`:

```rust [src/main.rs]
let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL is not set");
```

If you use `dotenvy`, you can keep `dotenvy::dotenv().ok()` while you migrate. It does not override variables that are already set.

## Any Other Language

If your language can read environment variables, it works with Ennote. Find the command that starts your app and run it as:

```bash
ennote secret get "<secret>" -- <your command>
```

<need-help>



</need-help>


## Sitemap

See the full [sitemap](https://docs.ennote.io/sitemap.md) for all pages.
