lundi 4 avril 2016

Rails server daemon working directory

So I found out per this question that when you run:

rails server -d

Rails decides that its Dir.pwd is /. So when trying to read a file on the system, I need to execute with full path of said file (File.read("#{Rails.root}/path/to/file"). How can I tell Rails to set Dir.pwd to Rails.root

Aucun commentaire:

Enregistrer un commentaire