I have a big problem after updating my ruby version form 2.4.1 to 2.5.1

First, after update I had an error, the command rails was not working anymore. So I delete it and reinstall it completely. After that rails new was working again ! But now, I encounter exactly the same problem with the command bundle. Do you have any idea of what is going wrong

```
Ignoring bcrypt-3.1.11 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.11
Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2
Ignoring binding_of_caller-0.8.0 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.8.0
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Ignoring bson-4.3.0 because its extensions are not built. Try: gem pristine bson --version 4.3.0
Ignoring byebug-10.0.1 because its extensions are not built. Try: gem pristine byebug --version 10.0.1
Ignoring byebug-10.0.0 because its extensions are not built. Try: gem pristine byebug --version 10.0.0
Ignoring byebug-9.1.0 because its extensions are not built. Try: gem pristine byebug --version 9.1.0
Ignoring byebug-9.0.6 because its extensions are not built. Try: gem pristine byebug --version 9.0.6
Ignoring debug_inspector-0.0.3 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.3
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.21 because its extensions are not built. Try: gem pristine ffi --version 1.9.21
Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring google-cloud-debugger-0.31.0 because its extensions are not built. Try: gem pristine google-cloud-debugger --version 0.31.0
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
Ignoring mini_racer-0.1.9 because its extensions are not built. Try: gem pristine mini_racer --version 0.1.9
Ignoring mysql2-0.5.1 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.1
Ignoring mysql2-0.4.10 because its extensions are not built. Try: gem pristine mysql2 --version 0.4.10
Ignoring nio4r-2.3.0 because its extensions are not built. Try: gem pristine nio4r --version 2.3.0
Ignoring nio4r-2.2.0 because its extensions are not built. Try: gem pristine nio4r --version 2.2.0
Ignoring nio4r-2.1.0 because its extensions are not built. Try: gem pristine nio4r --version 2.1.0
Ignoring nio4r-2.0.0 because its extensions are not built. Try: gem pristine nio4r --version 2.0.0
Ignoring nokogiri-1.8.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.1
Ignoring nokogiri-1.8.0 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.0
Ignoring nokogiri-1.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.7.2
Ignoring pg-0.21.0 because its extensions are not built. Try: gem pristine pg --version 0.21.0
Ignoring psych-2.2.4 because its extensions are not built. Try: gem pristine psych --version 2.2.4
Ignoring puma-3.11.3 because its extensions are not built. Try: gem pristine puma --version 3.11.3
Ignoring puma-3.11.2 because its extensions are not built. Try: gem pristine puma --version 3.11.2
Ignoring puma-3.11.0 because its extensions are not built. Try: gem pristine puma --version 3.11.0
Ignoring puma-3.10.0 because its extensions are not built. Try: gem pristine puma --version 3.10.0
Ignoring puma-3.9.1 because its extensions are not built. Try: gem pristine puma --version 3.9.1
Ignoring puma-3.9.0 because its extensions are not built. Try: gem pristine puma --version 3.9.0
Ignoring puma-3.8.2 because its extensions are not built. Try: gem pristine puma --version 3.8.2
Ignoring rainbow-2.2.2 because its extensions are not built. Try: gem pristine rainbow --version 2.2.2
Ignoring rinku-2.0.4 because its extensions are not built. Try: gem pristine rinku --version 2.0.4
Ignoring sqlite3-1.3.13 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.13
Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5
Your Ruby version is 2.5.1, but your Gemfile specified 2.4.1

```

The last line say that i've to update the gemfile with ruby 2.5.1, but when i do ruby -v the response is ruby 2.4.1. And if I change it, the command rails s don't run. 

I've also try :

```
gem pristine --all

```

But it give me a new error : 

```
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /Users/Mesnet/.rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/actionpack-5.1.1/CHANGELOG.md

```

So I'm really in a difficult situation right now. I cannot do anything on my work because of that. Any ideas will be great !!