![]() ![]() zshrc file: source /usr/local/share/chruby/chruby.sh Next, we'll add the following line to the end of the. We can open it with VS Code: $ code ~/.bash_profile If you are using zsh, locate a file called. If you are using bash, locate a file called. The configuration files for our shells live in our home directory. To use chruby, we'll need to do some minor configuration to our shell, whether bash or zsh. For instance, if we wanted to add Ruby 2.7.6, we'd run the following command: ruby-install ruby 2.7.6.Īfter the installation is complete, make sure to restart your terminal before proceeding to tell chruby to use this new version. Once ruby-install is set up, we can use ruby-install in the command line to install new versions of Ruby. We can install both with brew: $ brew install chruby Ruby-install will allow us to install different versions of Ruby. Also, if you followed along with the installation instructions in a previous lesson, you do not need to reinstall these tools.Ĭhruby will allow us to switch between different versions of Ruby. These lessons are intended for your personal environment - and to ensure that your personal environment matches the one in the curriculum. These packages should never be installed on Epicodus machines, which already have the correct version of Ruby installed on them. We'll focus on chruby because it's lightweight and easy to use. RVM is the most widely-used but has its share of problems and frustrations. After all, it would be poor etiquette in the workplace to expect your work to use your version of Ruby instead of the other way around!įortunately, there are many Ruby version managers that manage this job, including RVM, rbenv, and chruby. You shouldn't be expected to downgrade the Ruby version in your global environment in order for your projects to be compatible with Epicodus machines however, you should be able to use the same version we use at Epicodus. This issue may also come up at Epicodus if the version of Ruby that's installed on your personal machine is different from the version installed on Epicodus computers. However, you may still need to maintain past projects (especially if they're work-related), which means you'll need the ability to switch between different versions of Ruby in your personal environment. The version of Ruby you use for projects now will likely be different from the one you use a year from now, which in turn will be different from the version you use five years from now. In reality, updating older projects is often a huge pain point, especially in very large or dated projects. In an ideal world, developers would always use the latest, most perfect version of a language. Reach out to your instructor if you have any questions. However, as long as Windows users have installed Ruby+Devkit 3.1.2-1, there should be no need for a version manager for the Ruby/Rails curriculum. ![]() Windows users should use Ruby Version Manager, a Ruby version manager that is compatible with Windows. Ruby-install and chruby are not available for Windows users. This lesson goes into greater detail about using the tools ruby-install and chruby, which are tools for managing Ruby versions for Mac OS. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |