I'm seeing an unexpected environment variable dump

8 views
Skip to first unread message

Ralph Shnelvar

unread,
Jul 9, 2018, 11:57:36 AM7/9/18
to rubyonra...@googlegroups.com
Rubyonrails-talk,

My environment is:
Ubuntu 16.04
Rails 5.2.0
Ruby 2.3.1p112


I got a failure (the cause is as yet undetermined).  Here is, partially, the text (in orange) of the error message I got:
We're sorry, but something went wrong.

The issue has been logged for investigation. Please try again later.
Technical details for the administrator of this website
Error:
Web application could not be started
Error ID:
68b2c6fb
Details:

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:


I was surprised to see a dump of my environment variables!  I thought a dump of environment variables had been turned off for security reasons since some apps stored passwords and encryption keys in environment variables.

Comments, please.

Ralph Shnelvar

Brandon McClelland

unread,
Jul 9, 2018, 1:32:48 PM7/9/18
to rubyonra...@googlegroups.com
Hi Ralph, 

You have to explicitly turn those details off depending on the environment you're running the app in. For instance when you're running in development mode you want the details on so you can trace errors. When running in production you don't want those details to show for security purposes. You can check the setting in the /path/to/your/app/config/environments/ folder. You should see separate .rb files for each environment. The flag you need to look for is config.consider_all_requests_local, when set to true it will show the details dump.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1133053998.20180709095716%40dos32.com.
For more options, visit https://groups.google.com/d/optout.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

Hassan Schroeder

unread,
Jul 9, 2018, 1:46:30 PM7/9/18
to rubyonrails-talk
On Mon, Jul 9, 2018 at 8:57 AM, Ralph Shnelvar <ral...@dos32.com> wrote:

> I got a failure (the cause is as yet undetermined). Here is, partially, the
> text (in orange) of the error message I got:
> We're sorry, but something went wrong.
>
> The issue has been logged for investigation. Please try again later.
> Technical details for the administrator of this website
> Error:
> Web application could not be started
> Error ID:
> 68b2c6fb
> Details:

That isn't a base Rails-generated error. Are you seeing this message
in the console/log or on a web page?

If the latter, I'd guess you're running Apache httpd + Passenger, so
there may be config options there beyond what Rails provides.

> Comments, please.

If running in development mode, dumping env vars on error doesn't
seem particularly bad. (Passenger used to also do this in production
mode (!), though I'm told it no longer does.)

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
Reply all
Reply to author
Forward
0 new messages