Questions tagged [rbenv-vars]

To list vars configured by rbenv-vars: > rbenv vars To set environment variables for rbenv vars, edit the file .rbenv-vars in the folder from where Ruby is called. Each line has the format: VARNAME=varvalue When Ruby is called, ENV['VARNAME'] will yield 'varvalue'.

rbenv-vars is a plugin for rbenv, which is a Ruby version manager. rbenv-vars provides a convenient way to set environment variables for a Ruby program. These environment variables are independent of the code base of the Ruby program, and are set in the Ruby environment when Ruby is invoked via the shims from rbenv.

10 questions
3
votes
1 answer

rbenv-vars - Rails app is not reading them. How do they get loaded?

I am trying to deploy a Ruby 2.2 / Rails 4.2 application from a project I inherited, and rbenv-vars is used (along with rbenv). When I try to start the Puma service, I can tell that the rbenv variables aren't getting loaded because RAILS_ENV is not…
Jay Godse
  • 15,163
  • 16
  • 84
  • 131
2
votes
0 answers

How to use AWS Secrets Manager to store Heroku Env Vars

I have some secrets stored in AWS Secrets Manager. How can I reference that datastore source as a Heroku Env Var? Ideally, the envvar would update any time it is invoked. Thanks!
cars
  • 421
  • 7
  • 18
2
votes
0 answers

765: unexpected token at 'Mailgun Magnificent API' (Ruby on Rails, mailgun_rails)

I've been trying to set up the mailgun API with my rails app (in development) and I'm using the mailgun_rails gem, but when trying to send a message the Action Controller gives me an error: JSON::ParserError in UsersController#create 765: unexpected…
Finn
  • 21
  • 6
1
vote
0 answers

rbenv-vars not taking the values to system env vars

I am using rbenv-vars as I have done many times to make available RAILS_MASTER_KEY in the env vars. I have added the line to .rbenv-vars in project folder RAILS_MASTER_KEY=XXXXX I check with command rbenv vars, and it shows in the shell it's been…
Juanse Cora
  • 755
  • 9
  • 19
1
vote
0 answers

rbenv-vars working on console but not on web application

I'm using Ruby 2.7.2, Rails 6.0.3, Debian 10 with Nginx & Puma. I'm facing an issue with the web application. The environment variable is loaded by the rails console but not by the web application. I created the .rbenv-vars file in the project…
Guillaume
  • 1,437
  • 2
  • 15
  • 17
1
vote
3 answers

Rails + PostgreSQL + rbenv-vars: fe_sendauth: no password supplied using environment variables

I'm working on a Rails project which uses PostgreSQL and I want to store the database login details in a file and access them with environment variables using rbenv-vars. I'm running Ubuntu 16.10. Considering the following files: pg_hba.conf #…
user2126359
1
vote
2 answers

rbenv command not found on Mac OS

We are trying to run rbenv on El-Capitan 10.11.6. When we try to run rbenv command in the terminal we got the following error message: command not found We googled how to solve that issue and one possible solution is to add the "rbenv" to the…
Amrmsmb
  • 1
  • 27
  • 104
  • 226
0
votes
1 answer

rails console, rbenv and rbenv-vars issues in ubuntu 20.04

Im experiencing a bizzare issue in ubuntu 20.04. I've installed ruby 3.1.2, rails 6.1.5, rbenv and rbenv-vars. Set up inside the app directory the .rbenv-vars with RAILS_ENV=production RAILS_MASTER_KEY=123456 Whenever i try rails console i get a…
Filippos
  • 93
  • 1
  • 8
0
votes
1 answer

rbenv-vars, environment config file and Paperclip

I have an application running in Ruby on Rails. I use rbenv-vars to manage the environment variables used by the app and some of those variables are used in the environment config file to initialize AWS S3 storage setup in Paperclip's…
Alan Evangelista
  • 2,888
  • 6
  • 35
  • 45
-1
votes
1 answer

RubyMine doesn't load the rbenv-vars plugin

I use rbenv and the rbenv-vars plugins. They work fine when I launch my rails server in a terminal. So nothing is wrong with my configuration or my installation. If I launch my server from RubyMine, my environment variables aren't loaded. All the…
Fusco
  • 64
  • 8