native-navigation icon indicating copy to clipboard operation
native-navigation copied to clipboard

bundler under npm install fails to execute (wrong ruby version)

Open rborn opened this issue 8 years ago • 3 comments

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 :( )

rborn avatar Mar 27 '17 12:03 rborn

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 avatar Apr 05 '17 23:04 brunolemos

@brunolemos no love 😞 I must have a borked installation on my machine. I'll keep trying and let you know. Thanks for the help!

rborn avatar Apr 06 '17 08:04 rborn

@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

rborn avatar Apr 06 '17 09:04 rborn