I’m attempting to deploy my rails app from a bitbucket repo using the following tutorial: https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma
I have done everything in the tutorial, but when I get to deployment using “cap production deploy:initial”, I receive an error message. The deploy:install first pulls down the repo and sets up the capistrano stuff, but when it gets to bundling my gems, I get the following error:
DEBUG [1a250078] [31mAn error occurred while installing json (1.8.2), and Bundler cannot continue.
DEBUG [1a250078] Make sure that
gem install json -v '1.8.2' succeeds before bundling.[0m
I have tried everything from “making sure that gem install json -v 1.8.2” works on the server (which it does) to wiping the server and starting again.
Also, if I want to retry the deploy using capistrano I get an error because the symbolic link for nginx is not setup, which means I then need to remove the “apps” directory in /home/deploy/ on my server. Once I have done that, attempting to deploy will once again render the json -v ‘1.8.2’ error.
I really do not know what to do. My gemfile works perfectly locally.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!