Web and Database Programming.

Welcome!

I’m a software professional with 10 years experience spanning the full development life cycle–especially requirements analysis and database development. I’ve worked for small startups, large corporations, and government entities. My current interest is developing web applications with Ruby on Rails and related tools (MySQL, CSS, nginx/Passenger, Capistrano, Shoulda, git).

I collaborate with graphic designers to create solutions for business owners' websites. I also support general business computing needs.


Git submodules in Capistrano

Posted: June 6th, 2010 | Author: Bill | Filed under: Uncategorized | No Comments »

So, I’d added a module to my project by cloning it from github, and when I pushed it, the folder (on my Github’s’ project page) had a green arrow indicator. This means the folder contains a submodule.

Instead of pushing the cloned files, we’re going to create a pointer to the plugin so other copies of the repo will checkout the module from its own repo. If you deploy using Capistrano, you’ll have to make a small adjustment to make sure that happens. In your Capistrano config/deploy.rb file, put:

set :git_enable_submodules, true

And in RAILS_ROOT, put this in your .gitmodules file:

[submodule "vendor/plugins/awesome_nested_set"]
	path = vendor/plugins/awesome_nested_set
	url = git://github.com/collectiveidea/awesome_nested_set.git

When you run “cap deploy”, in addition to performing a “git pull”, Capistrano will also run a “git submodule init && git submodule update && git submodule sync.”



Leave a Reply