Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add the Rails 4 bin/ directory to git?

After I upgraded to Rails 4, the bin/ directory appeared. Do I need to commit this to git, or should I leave it for bundler to regenerate on the server?

like image 650
Matt Gibson Avatar asked Sep 03 '13 11:09

Matt Gibson


Video Answer


2 Answers

According to this article you should add it.

This will generate a bin directory in the root of your application. Make sure that it is not in your .gitignore file, and check this directory and its contents into git.

like image 77
parkydr Avatar answered Oct 27 '22 00:10

parkydr


Here is the message from Rails w.r.t bin/ directory:

In Rails 4, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand. Here's how to upgrade:

bundle config --delete bin    # Turn off Bundler's stub generator
rake rails:update:bin         # Use the new Rails 4 executables
git add bin                   # Add bin/ to source control

You may need to remove bin/ from your .gitignore as well.

like image 26
Marvin Danig Avatar answered Oct 27 '22 00:10

Marvin Danig