← Back to Upcase

Understanding rails path


(Shankar Dhanasekaran) #1
 APP_PATH = File.expand_path('../../config/application',  __FILE__)

this line of code is in /myhomefolder/myrailsapp/bin/rails file.

is it not trying to include a file from /myhomefolder/config/application? since the first ‘…’ should take to ‘myrailsapp’ as the present script folder is bin which is just one folder down the tree.

However, I tried to print APP_PATH and it prints the correct path inside myrailsapp? how is it working?


(Yevgeniy Viktorov) #2

The following answer on SO might be helpful:


(Shankar Dhanasekaran) #3

thanks very helpful.