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

Conversation

@ysbaddaden
Copy link
Owner

The rvm branch and this pull request will eventually make Prax correctly handle RVM.

The first commit removes any specific Ruby from $PATH which allows Prax to run Racker from a clean shell which should let RVM do it's job of choosing the correct ruby and gemset for the project.

This looks like to be enough with a simple Rack application (setting .ruby-version and restarting the instance actually selects the correct Ruby version):

run(lambda do |env|
  [200, {}, [RUBY_VERSION, "\n"]]
end)

@ysbaddaden
Copy link
Owner Author

There still is the following warning, but it looks like this is unavoidable (bin/prax prepends the libexec directory to $PATH) before running libexec/prax-start:

Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.1.5/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.1.5'.

@ysbaddaden
Copy link
Owner Author

@mpapis is it possible to avoid the warning message? If not, then I'm ok.

@mpapis
Copy link

mpapis commented Nov 25, 2014

the warning is displayed when you have GEM_HOME / GEM_PATH and they are not in sync with PATH - if you clean PATH then also clean the two other variables

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are about to merge it better move the set -e after sourcing RVM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants