Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Applications won't start using RVM #91

Closed
catphish opened this issue Jul 21, 2014 · 6 comments
Closed

Applications won't start using RVM #91

catphish opened this issue Jul 21, 2014 · 6 comments

Comments

@catphish
Copy link

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!

@ysbaddaden
Copy link
Owner

Please have a look to #77

@catphish
Copy link
Author

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.

@ysbaddaden
Copy link
Owner

It looks like a nice snippet for a wiki page.

@victorhazbun
Copy link

After you created the .praxconfig in your home directory, what you did next? what means "CWD"? Thanks @catphish

@catphish
Copy link
Author

catphish commented Aug 6, 2014

@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.

@ysbaddaden
Copy link
Owner

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants