![]() It also offers -dev versions, which is incredibly useful to let users check Ruby implementation bug fixes, or simply to try the latest/fastest/best build of a Ruby implementation. It offers a wide choice of Ruby versions. Ruby-build is the best-maintained Ruby installer.Īctive maintainers include from the CRuby core team, others and myself. Huge (25000 SLOC of Bash), hard to maintain, and due to that many bugs.The built Ruby can differ quite a bit from a standard build, which can cause extra issues.Binary builds of some CRuby versions on some platforms.Support the most Rubies, even very old ones (some with patches).Automatically installs system packages for many platforms.More platforms can be nice for beginners, but platform-specific code eventually always breaks due to incompatible changes in operating systems (e.g., package names). To be fair, RVM served me well at the time other Ruby installers/switchers did not exist. Which I really dislike as a Ruby implementer because it tends to break things in subtle ways (this behavior was later disabled when installing TruffleRuby). I had many uncertainties, and the large codebase plus a lot of global variables made it really tricky.Īs a result, there were multiple bugs and a lot more effort than for other Ruby installers.Īlso, RVM actually changes standard Ruby executables like rake, To give an idea, when I added support for TruffleRuby in RVM, Some features like gemsets seem much less needed nowadays as there is Bundler. To keep correct (note: I’m not counting test SLOC). Than all the others (25000 SLOC of Bash), and that makes it hard to maintain and That’s actually a doubled-edged sword, as it means RVM has a much larger codebase RVM is probably the oldest and certainly the TLDR: feel free to jump to the Conclusion and Recommendation. I am not reviewing Ruby installers or switchers for Windows as I have no experience with them. I contributed to all 3 Ruby installers when adding support for TruffleRuby,Īnd so I have experience both with their codebase and their usage. ![]() (These examples are from a MacOS machine).In this post I review the most popular Ruby installers (making it easier to install a Ruby)Īnd Ruby switchers (to switch between different Rubies conveniently). ruby-version is read automatically, and you’re automatically switched to the correct version of Ruby before you start working.įor example, you might have this sequence: % cd ~/projects/older-project It is very convenient because it hooks into the cd ( change directory) command. ![]() RVM is typically installed ( link) on a Linux, Unix or MacOS machine. ![]() Popular tools to help you manage your Ruby version are: ruby-version file, which simply specifies a version number, for example: 2.4.2 Many Ruby (or Rails) projects will include a simple. There are a couple of tools which are popular for this, but both have agreed to share a common file. This makes it much easier to manage multiple projects on your development machine, each expecting a different version of Ruby. If you don’t specify which version of Ruby your project needs, it can be very confusing when code works on one machine, but not another.Īs with most languages, it’s considered good practice to specify the version of Ruby that your code expects. This means that your project now also relies on Ruby 1.9 features. How does this cause problems?įor example, you might have decided to use a Gem which internally relies on Ruby 1.9 features. This older code will run on any version, but the newer syntax will only run on Ruby 1.9+. Probably the most visible change came with Ruby 1.9. This means that it is important to be clear about which Ruby version your code expects. And like many languages, there have been syntax changes across versions. Ruby has been in constant development since the 1990s.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |