New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ENVied Gem, Use dotenv Take 2 #9767
Conversation
|
|
||
| File.open("config/application.yml", 'r') do |file| | ||
| file.each_line do |line| | ||
| new_line = line.gsub(": ", "=") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhymes I found with your script the colons within the default URLs got swapped out for = which we dont want so I switched back to this way. I also couldn't find the commit even after fetching all so I went ahead and copied your code into my own commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script apparently works, then I booted the app, clicked around but http://localhost:3000/dashboard crashed and in the logs I can see the following:
ActionView::Template::Error - Must supply api_secret:
app/views/shell/_top.html.erb:37:in `view template'
app/controllers/shell_controller.rb:9:in `top'It looks like it's looking for some Cloudinary configuration...
forem/app/views/shell/_top.html.erb
Line 37 in d8ec6cb
| <link rel="apple-touch-icon" href="<%= cloudinary(SiteConfig.logo_png, 180, "png") %>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried the script, it worked, the app boots up correctly as well.
I haven't tested the container setup though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove some personal commented out env var but this works. On a slightly unrelated note, I got a lot of WARNING .. Key already set which is gone after I remove my application.yml.
Tested and working locally!
|
@citizen428 can you poke around the container setup and let me know if you see anything not working? Please and THANK YOU! |
|
Yeah @maestromac you have to live with those warnings until application.yml is removed manually or when we remove the Figaro gem |
What type of PR is this? (check all applicable)
Description
This is a followup to #9621. The difference between the original and this is the migration script. Now the migration
.env_samplefile so going forward they should always be present for users starting fresh.TODO: Remove sample application yml file and Figaro gem
Related Tickets & Documents
QA Instructions
You dont have to do all of these but if you want to give it a thorough test.
bin/setupbin/setupagain to make sure no errors