Ruby on Rails: 4.2.0 differences between rails and silo / rails

So, starting with Rails 4.1.x, it seems recommended to use rails under the application folder. Instead of the traditional:

rails server 

Rails recommends using

 bin/rails server 

It looks like bin / rails are referencing rails with additional materials. What would be the added benefits of using bin / rails over rails?

Second question: I used the rails server, the rails console, etc., and not the bin / rails server, the bin / rails console. Without using bin / rails, would I lose anything (for example, load some libraries incorrectly, etc.)?

Thanks.

+6
source share
1 answer

Put the following line in puts "In the bin/rails file" : puts "In the bin/rails file"

Now run rails server . You will probably see that the rails command executes the bin/rails file.

I assume the official guide suggests using bin/rails for two reasons:

  • Avoid using another rail instance if your paths are not configured correctly.
  • Speed ​​- bin/rails seems a little faster than just rails
+7
source

Source: https://habr.com/ru/post/980509/


All Articles