Issue : I have two applications A & B both running on the same server. I have a script in the filesystem
cd /data/B/
bundle exec rake -T
When i run the script through the rails console of application A it errors as the console loads the gems of A and the rake task fails
eg: system("sh ~/test.sh")
rake aborted!
LoadError: cannot load such file -- log4r
/home/kumolus/api/config/application.rb:9:in `require'
/home/kumolus/api/config/application.rb:9:in `<top (required)>'
/home/kumolus/api/Rakefile:1:in `require'
/home/kumolus/api/Rakefile:1:in `<top (required)>'
(See full trace by running task with --trace)
When i run the script through the unix command line (irrespective of my pwd) it works
cd ~
sh test.sh #works
cd /data/A #my application A's dir
sh ~/test.sh #also works
I need it to work through rails.Any help ? Thanks!