What does --pre
do in gem install rails --pre
?
gem install bundler installs a gem(library) that will help you to manage your project dependencies. Then you have a project that contains a file called Gemfile , when you cd into that directory and enter bundle install it will install all gems needed for that project.
Almost seems like running 'gem install' adds it to the global available gems (and hence terminal can run the package's commands), whereas adding it to the gemfile and running bundle install only adds it to the application. Similar to npm install --global. that's basically it.
With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.
gem update will update all installed gems to their latest versions, so it will update Rails to 3.0. 0. in your application folder. Thus your application will be associated and run in rails 2.3.
--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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With