Directory path in rails outside app directory -


i've created script ("script.rb") in project "bin" directory. inside file i'm including environment.rb file. looks this:

require /home/user/rails-project/config/environment.rb 

the problem need able upload file live server path of environment.rb file totally different. need config path dynamically. problem file outside "app" (it's in "bin") i'm not able this:

require "#{rails.root}/config/environment.rb" 

any ideas?

on server should create symlink this. common practice secret files (file passwords) , database.yml file.

on server: cd path/to/config/ ln -s path/to/environment.rb environment.rb


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -