So starting from Rails 4.1.x there seems to be a recommended way to use rails under the application folder. Instead of the traditional:
rails server
it is recommended by Rails official guide to use
bin/rails server
It looks like the bin/rails is referencing rails with additional stuff. What would be the additional benefits of using bin/rails compared to rails?
A second question is - I was used to use rails server, rails console, etc. rather than bin/rails server, bin/rails console. Without using bin/rails, would I lose anything (like misloading some libs, etc.)?
Thanks.
Put the following line in your bin/rails file: puts "In the bin/rails file"
Now run rails server
. You'll likely see that the rails
command is executing the bin/rails
file.
I'm guessing the official guide suggests using bin/rails
for two reasons:
bin/rails
seems to be a bit faster than just rails
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