I'm trying to bundle a rails app on an Ubuntu staging server, so that I can more or less just copy the whole thing to the production server.
Reason: I do not have privileges to install gems on production, being a managed server.
So, I ran bundle install
on the staging server
followed by scp -rC vendor/bundle user@production:~/app_dir/vendor/
Issues:
- I'm not seeing the website after restarting the production webserver (apache/passenger) - instead I get "403 - You don't have permission to access / on this server.".
- If I run for example
rails c
orrake assets:precompile
I get "Could not find rake-10.4.2 in any of the sources" even though rake-10.4.2 exists in the vendor/bundle/ruby/2.0/gems folder
Is my approach of bundling and copying a sound one?
How do I make the rails app on production work with the gems from the vendor-folder?