Cron is running in home directory instead of file directory
问题 I followed some other posts in stackoverflow and successfully setup cron with RVM using rvm cron setup and injected some ENV to the crontab file. When I was troubleshooting why the dotenv gem is not working, I realised the following: I placed my test.rb in file path /home/myuser/ruby/test.rb and had my crontab file as shown below: * * * * * ruby /home/myuser/ruby/test.rb >> /home/myuser/ruby/output.log and when I puts the output of the test.rb with Dir.pwd . The output states that the rb is