What does --pre do in gem install rails --pre?
Solution 1
--pre
means that it will install the prerelease of the rails gem. For instance when Rails 3 was still in beta, you could still play around with it by getting the prerelease.
You shouldn't run this unless you want to be on edge of a gem (for development or test purposes). I wouldn't recommend putting a website in production with a gem in prerelease as they might not be stable enough yet.
Solution 2
--pre
flag lets you install a pre-release version of a gem. A pre-release version is any version that has at least one letter in the version number, e.g. '4.1.2.beta1' or '2.3.rc2' and so forth. For example, running:
$ gem install rails --pre
will install the latest not officially released version of rails (4.1.0.rc1 at the time of writing). If you want to install other than the latest, you may do so by passing the version in the -v
option, e.g.:
$ gem install rails -v 4.1.0.beta1 --pre
The command above will install 4.1.0.beta1 version of the rails gem as well. Hope this helps.
Solution 3
If you would like to see what will be installed by a gem
command, you can use the --explain
flag. So, if you wanted to see what version of rails
would be installed by the --pre
flag, you can run.
gem install rails --pre --explain
ben
Updated on June 25, 2022Comments
-
ben almost 2 years
What does
--pre
do ingem install rails --pre
?