Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with multiple ruby projects using rvm #4

Closed
masterkain opened this issue Jan 16, 2012 · 5 comments
Closed

Issues with multiple ruby projects using rvm #4

masterkain opened this issue Jan 16, 2012 · 5 comments

Comments

@masterkain
Copy link

Hello,
this is my Procfile that resides in my main project dir:

web:  bundle exec rainbows -p $PORT -c ./config/unicorn.rb
node: subcontract --chdir ../node --signal INT -- coffee application.coffee --environment development --uploader --streamer
push: subcontract --rvm "--with-rubies rvmrc" --chdir ../push --signal INT -- bundle exec slanger --app_key xxx --secret xxx --redis_address redis:https://127.0.0.1:6379/0

Now, ../push does use a .rvmrc like this:

rvm use --create --install ruby-1.9.2-p290@push

if ! command -v bundle ; then
  gem install bundler --no-rdoc --no-ri
fi

if ! command -v foreman ; then
  gem install foreman --no-rdoc --no-ri
fi

The issue here is that everytime I run foreman startwith this Procfilethe system will attempt to download bundler and foreman gems for the push project, sometimes only foreman, like in the example below:

18:31:13 push.1    | started with pid 26375
18:31:25 push.1    | 
18:31:25 push.1    | RVM is not a function, selecting rubies with 'rvm use ...' will not work.
18:31:25 push.1    | /Users/kain/.rvm/bin/bundle
Fetching: foreman-0.34.1.gem (100%)man-0.34.1.gem
18:31:25 push.1    | Successfully installed foreman-0.34.1
18:31:25 push.1    | 1 gem installed
18:31:25 push.1    | Unrecognized command line argument: 'bundle' ( see: 'rvm usage' )

Any idea? Thanks.

.bash_profile

[[ -s "/Users/kain/.rvm/scripts/rvm" ]] && source "/Users/kain/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@masterkain
Copy link
Author

I have now updated my .rvmrc to the latest RVM templates, just an issue is left:

push: subcontract --rvm "--with-rubies rvmrc" --chdir ../push --signal INT -- bundle exec slanger --app_key xxx --secret xxx --redis_address redis:https://127.0.0.1:6379/0

Results in a:

18:46:50 push.1    | Unrecognized command line argument: 'bundle' ( see: 'rvm usage' )

@pitluga
Copy link
Owner

pitluga commented Jan 17, 2012

You rvmrc seems to be working fine for me. I have had issues installing foreman. For me it seems the latest version of foreman has an invalid gemspec. What versions of ruby, rvm, and foreman are you using for the top-level that is launching all your projects?

@swalke16
Copy link

swalke16 commented May 8, 2012

Having the same issue as @masterkain. System info:

RVM: 1.11.3
RUBY: 1.9.3-head
FOREMAN: 0.46.0

@swalke16
Copy link

swalke16 commented May 8, 2012

Changing the line to this

push: subcontract --rvm --with-rubies default-with-rvmrc do --chdir ../push --signal INT -- bundle exec slanger --app_key xxx --secret xxx --redis_address redis:https://127.0.0.1:6379/0

fixes the problem for me. The quotes are not needed, and the RVM command has changed.

@pitluga
Copy link
Owner

pitluga commented May 9, 2012

Thanks @swalke16 for getting to the bottom of it. I'll update the documentation.

@pitluga pitluga closed this as completed May 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants