Your Ruby version is 3.0.2, but your Gemfile specified 2.7.5

I enocuntered this error while setting up Meshery according to the steps specified in Meshery’s contributing guide.

anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ bundle install
Your Ruby version is 3.0.2, but your Gemfile specified 2.7.5

Can anyone please help me out?

Hey @Anand_Theertha if you are using rvm then you should go through this command

rvm install ruby 2.7.5

because meshery use ruby version 2.7.5. Let me know if this work

Hey @Anand_Theertha what worked for me was as @Sudhanshu_Dasgupta suggested:

rvm install ruby 2.7.5

as then just in case:

rvm --default use 2.7.5

Another workaround for this would be to change the ruby version specified in the gemfile itself but I would NOT suggest you do that as @Sudhanshu_Dasgupta said, meshery uses ruby 2.7.5 as default. I faced some errors when I changed the gemfile version last time😄

i was able to get the right ruby version. But the following commands don’t seem to pick it up.

anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ rvm install ruby 2.7.5
Already installed ruby-2.7.5.
To reinstall use:

    rvm reinstall ruby-2.7.5

anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ rvm --default use 2.7.5
Using /usr/share/rvm/gems/ruby-2.7.5
anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ gem install bundler
ERROR:  Loading command: install (LoadError)
	cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ bundle install
Your Ruby version is 3.0.2, but your Gemfile specified 2.7.5
anandtheertha@anandtheertha-Aspire-F5-573G:~/Desktop/meshery/docs$ make docs
bundle install
Your Ruby version is 3.0.2, but your Gemfile specified 2.7.5
make: *** [Makefile:13: install] Error 18

@Anand_Theertha this is the reason of compatibility issues for the ruby and gem versions in windows.
I would like you to do the same steps as I have done.

  1. Install ruby 2.7.5 setup from the ruby installer. Probably you would find it in the archive section of the website(not through rvm) and follow the steps as given in Jekyll setup
  2. Then you should check all the versions once with -v.
  3. Then try to do a bundle install in the terminal and make site as follows.

Hey @Anand_Theertha Let’s ensure that you’re question is answered. Should we mark the answer above as the “Solution” or is this still an open question?”

I guess we can mark this as the solution @Manish_Tyagi because we had a talk last month and he was able run meshery in his local server.