如何从本地 git 存储库或其他本地源在 Rails 3 中安装插件?
我想从本地 git 存储库安装 Rails 3 插件。我已经尝试过
rails plugin install git:/c/Users/Mike/myplugin
myplugin 是 git 存储库,但出现未找到错误
Plugin not found: ["git:/c/Users/Mike/myplugin"]
我也尝试过这些命令但没有成功:
rails plugin install git:/c/Users/Mike/myplugin.git
rails plugin install /c/Users/Mike/myplugin
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 myplugin 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的设置是什么样的?您是在本地运行 git 服务器还是只有本地 git 存储库?据我所知,如果您正在运行本地 git 服务器,则这不是有效的语法: git:/c/Users/Mike/myplugin
它应该看起来像这样,带有本地服务器地址(并且git 端口(如果您没有通过端口 80 运行服务器):
如果您尚未在本地安装 git 服务器,那么将其放在 github(免费)上并使用 github URL 可能会更容易。
另一种选择是忘记 git 并将插件复制到
/myapp/vendor/plugins
如果 install.rb 中有任何特殊内容,您需要手动运行它。
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):
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
If there is anything special in the install.rb, you would need to run that manually.