Applications won't start using RVM
Closed this issue · 6 comments
I am using RVM and prax will not start any of my applications automatically. The log file only shows the command being run:
bundle exec ruby /opt/prax/bin/../lib/racker/command.rb --server /home/charlie/.prax/_sockets/identity.sock
bundle exec ruby /opt/prax/bin/../lib/racker/command.rb --server /home/charlie/.prax/_sockets/identity.sock
Running this command manually in my shell causes the application to start successfully.
I suspect the problem relates to RVM's environment not being loaded, but I am unsure how to fix this.
Thanks!
Please have a look to #77
Thank you, I fixed this with a fairly simple .praxconfig
rvm_path="$HOME/.rvm/"
source "$rvm_path/scripts/rvm"
cd $PWD
It seems necessary to re-run the CWD after RVM has been loaded.
It looks like a nice snippet for a wiki page.
After you created the .praxconfig in your home directory, what you did next? what means "CWD"? Thanks @catphish
@victorhazbun87 I followed the normal installation procedure for prax. The only change I had to make was to create the .praxconfig as above and make it executable: chmod +x .praxconfig
CWD means "change working directory" and my script above handles this with the "cd $PWD" command after RVM has been initialized.
It seems necessary to re-run the CWD after RVM has been loaded.
I understand RVM aliases many shell commands, so it's very likely that the .ruby-version
file won't be loaded until cd
is executed (ie. it selected the default ruby).