How to install plugin in Rails 3 from local git repository or other local source?
I want to install a Rails 3 plugin from a local git repository. I have tried
rails plugin install git:/c/Users/Mike/myplugin
where myplu开发者_开发技巧gin is the git repository, but I get a not-found error
Plugin not found: ["git:/c/Users/Mike/myplugin"]
I've also tried these to commands without success:
rails plugin install git:/c/Users/Mike/myplugin.git
rails plugin install /c/Users/Mike/myplugin
What is your setup like? Are you running a git server locally or do you just have a local git repo? As far as I know, this is not valid syntax if you are running a local git server: git:/c/Users/Mike/myplugin
It should look something like this with the local server address (and git port if you are not running the server thru port 80):
rails plugin install git://127.0.0.1/myplugin.git
If you don't already have the git server installed locally, then it would probably be easier just to put it on github (its free) and use the github URL.
Another option is to just forget about git and copy the plugin to /myapp/vendor/plugins
cp -R /pathtomyplugin /myapp/vendor/plugins/
If there is anything special in the install.rb, you would need to run that manually.
精彩评论