bundler under npm install fails to execute (wrong ruby version)
if I run npm install the script dies with
Your Ruby version is 2.0.0, but your Gemfile specified 2.4.0
however if I run bundle install --binstubs ./examples/ios && bundle exec pod install --project-directory=./example/ios/ all goes fine
my env:
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
$ bundler -v
Bundler version 1.14.6
Any idea? (sorry, not versed with ruby :( )
Hi @rborn, try running this:
curl -sSL https://get.rvm.io | bash -s stable --ruby=2.4.0
Then open a new terminal tab (on this project folder) and run:
rvm use ruby-2.4.0 --default
gem install bundler
Now your npm install should work.
@brunolemos no love 😞 I must have a borked installation on my machine. I'll keep trying and let you know. Thanks for the help!
@brunolemos I found it (not fixed yet though) - it seems that the npm script uses the default bundle on the system instead of the one set by rvm. I need to find how to force npm to use my settings