For some reasons the file of the gem random_unique_id end up with the wrong permissions when installed on deployment:
# ls -la /var/www/projectx/shared/bundle/ruby/2.1.0/gems/random_unique_id-0.2.0
total 48
drwxrwxr-x 5 projectx projectx 4096 May 26 23:36 .
drwxrwxr-x 148 projectx projectx 4096 May 26 23:36 ..
-rw------- 1 projectx projectx 320 May 26 23:36 Gemfile
drwxrwxr-x 2 projectx projectx 4096 May 26 23:36 gemfiles
-rw------- 1 projectx projectx 184 May 26 23:36 .gitignore
drwxrwxr-x 3 projectx projectx 4096 May 26 23:36 lib
-rw------- 1 projectx projectx 1067 May 26 23:36 LICENSE.txt
-rw------- 1 projectx projectx 223 May 26 23:36 Rakefile
-rw------- 1 projectx projectx 1000 May 26 23:36 random_unique_id.gemspec
-rw------- 1 projectx projectx 2934 May 26 23:36 README.md
drwxrwxr-x 2 projectx projectx 4096 May 26 23:36 test
-rw------- 1 projectx projectx 127 May 26 23:36 .travis.yml
They should be readable by all. Other gems have the right permissions:
# ls -la /var/www/projectx/shared/bundle/ruby/2.1.0/gems/sorcery-0.8.5/
total 76
drwxrwxr-x 4 projectx projectx 4096 May 26 23:36 .
drwxrwxr-x 148 projectx projectx 4096 May 26 23:36 ..
-rw-r--r-- 1 projectx projectx 5802 May 26 23:36 CHANGELOG.md
-rw-r--r-- 1 projectx projectx 55 May 26 23:36 .document
-rw-r--r-- 1 projectx projectx 733 May 26 23:36 Gemfile
-rw-r--r-- 1 projectx projectx 503 May 26 23:36 Gemfile.rails4
-rw-r--r-- 1 projectx projectx 865 May 26 23:36 .gitignore
drwxrwxr-x 4 projectx projectx 4096 May 26 23:36 lib
-rw-r--r-- 1 projectx projectx 1083 May 26 23:36 LICENSE.txt
-rw-r--r-- 1 projectx projectx 117 May 26 23:36 Rakefile
-rw-r--r-- 1 projectx projectx 10309 May 26 23:36 README.md
-rw-r--r-- 1 projectx projectx 8 May 26 23:36 .rspec
-rw-r--r-- 1 projectx projectx 1309 May 26 23:36 sorcery.gemspec
drwxrwxr-x 8 projectx projectx 4096 May 26 23:36 spec
-rw-r--r-- 1 projectx projectx 329 May 26 23:36 .travis.yml
-rw-r--r-- 1 projectx projectx 5 May 26 23:36 VERSION
I'm installing these gems by using Bundler 1.6.2 and the Gemfile includes random_unique_id like this:
gem "random_unique_id", "~> 0.2.0"
I'm deploying using Capistrano 3.2.1 (Rake Version: 10.3.1) and capistrano-bundler 1.1.2. The generated bundle line looks like this:
cd /var/www/projectx/releases/20140526233202 && /usr/local/rvm/bin/rvm default do bundle install --binstubs /var/www/projectx/shared/bin --path /var/www/projectx/shared/bundle --without development test --deployment --quiet
Any ideas what can cause this issue?
Disclaimer: I wrote that gem, random_unique_id, but I don't see how that can have any effect.