-
For legacy projects, check your installed versions of ruby against this list.
-
If you have a version that will work with the Rails version you need, then proceed to 4, if not go to 3, install an compatible version using rbenv.
-
After installing a compatible version, switch your local ruby version for your project folder to the relevant one:
rbenv versions
rbenv local 2.4.0
rbenv versions
rbenv rehash
rbenv which irb
rbenv whence rackup
gem search rails | grep "^rails "
- Then, navigate to the project folder and locally install the version of Rails you require with this command, using a compatible ruby version.
RBENV_VERSION=2.4.0 rbenv exec gem install rails --version 4.2.11
Build new Rails version:
RBENV_VERSION=2.4.0 rbenv exec rails _4.2.11_ new recipefinder
- Navigate to the new folder that contains your rails app and set the local version of ruby:
cd recipe-finder
rbenv local 2.4.0
- Start the web server:
bin/rails server
from Desktop, in WSL bash: