regmiprem
regmiprem

Reputation: 735

Implement capistrano in ruby on rails having database MongoDB

I want to implement capistrano in my ruby on rails project. I am using MongoDB as database . I install capistrano gem.

capify .
[add] writing './Capfile'
[add] writing './config/deploy.rb'
[done] capified!

It gives me file deploy.rb inside the Config. What should i do inside. so where do i have to put mongoid.yml ? Working code is helpful for me to do or some hints is appreciable.

Upvotes: 0

Views: 715

Answers (2)

Prakash Murthy
Prakash Murthy

Reputation: 13077

You should first be clear about why you want to implement capistrano :-)

Capistrano is a tool for making deployments easier - it allows for executing commands in multiple remote machines, via ssh.

For a default installation of a Rails App with mongodb, you don't need to have anything related to mongodb in the capistrano deploy.rb file.

You would add some mongodb stuff in this file if there is some mongodb related task that you want to accomplish every time the code is deployed to the remote servers.

Example: Here is a capistrano recipe example to synchronize local mongodb with production

I would recommend that you familiarize yourself with the basics of capistrano by watching the railscast episode on capistrano tasks.

Upvotes: 1

Thomas Ruiz
Thomas Ruiz

Reputation: 3661

Put mongoid.yml in /config, and type cap deploy in /.

Upvotes: 0

Related Questions