使用devise没有宝石,可以简单的复制文件吗? [英] using devise WITHOUT the gem, can I simply copy the files?

查看:137
本文介绍了使用devise没有宝石,可以简单的复制文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以简单地将设计应用程序和lib(和gem?)文件夹复制到我的各自的项目文件夹中,让它们的工作就像我在使用宝石一样吗?我想这样做所以我可以真正看到所有的代码,可能做一些自定义,并且还避免了我的IDE中的一些找不到错误。

Could I simply copy the devise app and lib (and gem?) folders into my respective project folders and have them work just as if I was using the gem? I'd like to do this so that I can really see all the code, possibly do some customization, and also avoid some "cannot find" errors in my IDE.

这是一个坏的想法?如果这是可以工作的东西,我只需要删除宝石并复制所需的文件,或者我需要撤消宝石所做的事情。这可以通过更新来创造问题吗?

Is this a bad idea? If this is something that would work would I simply need to remove the gem and copy over the necessary files or would I need to "undo" things that the gem has done. Could this create problems down the road with updates?

最后,当我的项目中没有所有的代码时,设计究竟如何工作? strong>当我离线时工作,代码只是存储在一些秘密的不可见文件或什么东西?做一些宝石需要一个互联网连接才能检索它们的功能,或者只要在宝石文件中声明它就可以复制和使用任何宝石。

推荐答案

请参阅 http://bundler.io/v1 .5 / git.html

Bundler还允许您在本地处理git存储库而不是使用远程版本。这可以通过设置本地覆盖来实现:

bundle config local.GEM_NAME /path/to/local/git/repository

另外

< a href =http://ryanbigg.com/2013/08/bundler-local-paths/ =nofollow> http://ryanbigg.com/2013/08/bundler-local-paths/

Bundler有一个已知的功能,允许您在本地开发时使用本地Git仓库,并在部署时使用远程Git repo。意味着您不再需要在本地路径之间切换:

gem 'spree', :path => "~/Projects/gems/spree"

远程路径:

gem 'spree', :github => 'spree/spree', :branch => 'master'

这篇关于使用devise没有宝石,可以简单的复制文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆