# How to use Doppler with RubyMine IDE

**URL:** <https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604>\
**Category:** Need Help\
**Created:** [April 25, 2022, 7:25pm UTC](https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604 "2022-04-25T19:25:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lizzie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/lizzie/32/419_2.png) [@lizzie](https://community.doppler.com/u/lizzie)\
**Post date:** [April 25, 2022, 7:25pm UTC](https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604/1 "2022-04-25T19:25:25Z")

</div>

Hi all, how can I configure doppler to run/debug my rails app in RubyMine?

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [April 29, 2022, 8:05pm UTC](https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604/2 "2022-04-29T20:05:26Z")

</div>

Hi @lizzie!

Welcome to the Doppler Community!

Sorry for the delay getting back to you on this! I did some looking at RubyMine and it looks like you can somewhat accomplish this using RubyMine’s support for External Tools. In the [Run/debug configuration](https://www.jetbrains.com/help/ruby/run-debug-configuration.html) there’s a **Before launch** section where you can have it run an External Tool. This would let you hook in and execute your application using Doppler when you run the debugger. Here are some screenshots showing how you might do that:

1. 

2. 

3. ![3](https://us1.discourse-cdn.com/flex016/uploads/doppler/original/1X/5a627f5c7bb3738ffeb2107ec319544e822dff21.png)

4. ![4](https://us1.discourse-cdn.com/flex016/uploads/doppler/original/1X/229847887979189caa7a6c11bf251b1ee26f24a6.png)

5. 

Will that work for what you’re after?

---

<div class="post-metadata">

**Author:** ![lizzie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/lizzie/32/419_2.png) [@lizzie](https://community.doppler.com/u/lizzie)\
**Post date:** [May 10, 2022, 10:17pm UTC](https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604/3 "2022-05-10T22:17:17Z")

</div>

Hi, thanks so much for the response!

This works just for running the app regularly, but not for the built in RubyMine debugger - do you know if there’s another way I can set this up to get debugging working?

For reference, this is the command that’s run when I run a rails app with the debugger:

```auto
/Users/lizzie/.asdf/installs/ruby/2.7.5/bin/ruby /Users/lizzie/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-2.3.1/bin/rdebug-ide --key-value --step-over-in-blocks --disable-int-handler --evaluation-timeout 10 --evaluation-control --time-limit 100 --memory-limit 0 --rubymine-protocol-extensions --port 60007 --host 0.0.0.0 --dispatcher-port 60008 -- /Users/lizzie/workspace/os-app/bin/rails server -b 0.0.0.0 -p 3000 -e development

```

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [August 5, 2022, 5:34pm UTC](https://community.doppler.com/t/how-to-use-doppler-with-rubymine-ide/604/4 "2022-08-05T17:34:49Z")

</div>

Hi @lizzie!

We just released a gem that might help you here. Could you give it a look?

> **[GitHub - DopplerHQ/ruby-doppler-env: Automatically inject Doppler secrets as...](https://github.com/DopplerHQ/ruby-doppler-env)**
>
> Automatically inject Doppler secrets as environment variables for use during local development. - GitHub - DopplerHQ/ruby-doppler-env: Automatically inject Doppler secrets as environment variables...

The TL;DR is that you require it in your application and it will either execute the CLI using the credentials setup for the project directly with `doppler setup` or if `DOPPLER_TOKEN` is set, it’ll use that to pull in secrets via the API. It then sets them in `ENV`.

To use it:

```auto
gem install doppler-env

```

and then add this as the first require in your project:

```auto
require "doppler-env/load"

```

For a Rails application, adding the require at the top of `config/environments/development.rb` works great.

Keep in mind, this is meant to be used solely in a development environment and not in production. It should get things working in RubyMine for you though!

Let me know if it helps!

Regards,  
-Joel
