I'm not able to find much information about this task. I can't understand its purpose or when it should be run. Could someone explain what this task is about and why/when it's useful?
Rake is a popular task runner for Ruby and Rails applications. For example, Rails provides the predefined Rake tasks for creating databases, running migrations, and performing tests. You can also create custom tasks to automate specific actions - run code analysis tools, backup databases, and so on.
Including => :environment will tell Rake to load full the application environment, giving the relevant task access to things like classes, helpers, etc. Without the :environment , you won't have access to any of those extras.
The rake rails:update:bin
task creates binstubs for bundle
, rails
and rake
.
Binstubs are wrapper scripts around executables (sometimes referred to as "binaries", although they don't have to be compiled) whose purpose is to prepare the environment before dispatching the call to the original executable.
In other words, the binstubs makes sure that the correct version of the gem included in your project is executed, achieving a similar result to bundle exec your_command
, but without having to explicitly type it every time.
It is used to re-create your binstubs when they got removed for some reason, or when you are upgrading from Rails 3 that didn't provide them by default.
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