Rails Root directory path?

后端 未结 9 1293
攒了一身酷
攒了一身酷 2020-11-30 16:40

How do I get my Rails app\'s root directory path?

9条回答
  •  感情败类
    2020-11-30 17:34

    You can use:

    Rails.root
    

    But to to join the assets you can use:

    Rails.root.join(*%w( app assets))
    

    Hopefully this helps you.

提交回复
热议问题