Script/plugin install vs git submodule add

I’ve found several web pages that describe how to use git submodules
to install plugins, but it seems that those pages are missing
something (or more likely, I am) .

In a nutshell, they advise replacing

$ script/plugin install git://path_to_spiffy_plugin


$ git submodule add git://path_to_spiffy_plugin

It seems to me that these are not exactly equivalent… aren’t there
installation scripts that get run when one runs “script/plugin
install”? Is it as simple as manually looking for a
vendor/plugins/spiffy_plugin/init.rb and running that script in Ruby?
Or does it need to be run using (somehow) script/runner, so that the
proper Rails environment is set up for the script.

Are there other things that script/plugin install does?

I notice that there is a -x option for script/plugin install, but that
is specific to subversion. It doesn’t work with git.

Finally, for anybody who stumbles across this post in the future, I
believe that the equivalent to the “-r” option for script/plugin
install is “-b” for git submodules add. e.g.

$ script/plugin install
git:// -r rails-2.3


$ git submodule add -b rails-2.3


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs