简体   繁体   中英

RVM won't create gemset for a new project

RVM doesn't seem to be automagically creating a new gemset for a newly cloned git based rails project as it did for other projects when cd ing into the project folder. I get this message:

ruby-2.2.4 is not installed.

I am using ruby-2.3.1 and have set it as the default and that is the only ruby version I installed using rvm . Why am I getting that error message? I am on a MAC (Sierra OS) if that matters.

It started happening randomly as soon as I cloned a new project. I don't see ruby-2.2.4 being mentioned in the gemfile or the gemspec . Where is it picking it from?

If you paste the whole error message you get when trying to run bundle install it'll be easier to say for certain, but I'm assuming one of the gems in your gemfile requires Ruby version 2.2.4.

Just type in

rvm install 2.2.4

Then run bundle install again and all should be well, assuming no other errors.

You may need to switch which version of Ruby you're using based on which project you're in, just use

rvm use 2.4.0

rvm use 2.2.4

etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM