Closed dt1973 closed 9 years ago
Is /home/www/myapp/
the $HOME
and did you check echo ${RUBIES[@]}
? Also, it is far simpler to not use chruby in production, but instead install ruby via brightbox or into /usr/local
via ruby-install.
Yup:
% env
HOME=/home/www/myapp
% echo ${RUBIES[@]}
/home/www/myapp/.rubies/ruby-2.2.0
Basically I'm using chruby because installing Ruby locally seems to be the only way I can use my Rails app without Bundler, Rake etc. complaining about the lack of /usr/local
permissions.
@dt1973 that is what bundle install --deployment
is for. It will install all gems into $app/vendor/gems/
.
Double check your shell configuration. I'm guessing you're loading chruby only for interactive shells, but not for uninteractive shells.
I was under the impression that bundle install --deployment
was to be avoided due to the whole:
You are trying to install in deployment mode after changing your Gemfile. Run
bundle install
elsewhere and add the updated Gemfile.lock to version control.
thing. Came across http://stackoverflow.com/questions/6785626/unable-to-update-gems-on-production-server with no real solution, just a quick fix:
bundle install --no-deployment && bundle update && bundle install --deployment
--deployment
is designed for production and when you have a committed Gemfile.lock
. It also does not require sudo
access, which is a must for production.
Cool, fair enough. Thanks man!
Close it if you wish.
Closing for now, but I suspect there might be whitespace in .ruby-version
. Try running hexdump -C .ruby-version
.
Why won't
ruby-2.2.0
in.ruby-version
work, whereaschruby ruby-2.2.0
will?Full transcript of deployment:
https://gist.github.com/dt1973/7b99dfb75bd26e1e5ed7