You're never too old to learn something new.
uday's blog
Rails and environment variables - Lesson Learned 5
Submitted by uday on October 28, 2020 - 3:46pmI was trying to send emails from my Rails app and I was NOT getting any success.
As per Rails documentation, I did everything I was supposed to do.
$rails generate mailer UserMailer
Then I created method inside UserMailer class /app/mailers/user_mailer.rb and built the email templates in folder /app/views/user_mailer folder.
Then I added code to invoke the user mailer with following code.
Environment variable
Submitted by uday on October 26, 2020 - 2:29pm$printenv (or $env) # TODO: I need to investigate what is difference in printenv Vs. env.
(This command will print ALL environment variables.)
$printenv USER
$echo $USER
(This will show value for environment variable = USER )
$printenv | grep RUBY
(This will show only those environment variable that contain RUBY. We have used grep command for this.)
$export EDITOR=atom
Using ngrok for Stripe webhook testing - Lessons Learned 4
Submitted by uday on October 23, 2020 - 5:48pmThe following is a helpful video for stripe webhook testing.
In this video, I learned about ngrok. Using ngrok, we can set up Stripe webhooks in the dashboard which will then forward the events to our local server.
What is ngrok?
How to get route information for your Rails app - Lessons Learned 3
Submitted by uday on September 25, 2020 - 3:29pmWe can get the route information in 2 ways.
1. From the terminal, run following command from the project home folder.
$rake routes
2. Form the browser, go to path rails/info/routes
http://localhost:3000/rails/info/routes
Reading from the browser is convenient if you are developing on Windows machine and grep command is not available.