简体   繁体   English

在不使用Rails生态系统的情况下由CSS Designer在Rails中进行前端编辑?

[英]Front-end editing in Rails by css designer without using rails eco-system?

My app has a Ruby on Rails back-end (using git and heroku), and a front-end designer (css/jquery) just asked if he could work on the code without install rails (ie downloading the code from git, and just ftp'ing it to heroku). 我的应用程序有一个Ruby on Rails后端(使用git和heroku),以及一个前端设计器(css​​ / jquery)只是问他是否可以在不安装Rails的情况下使用代码(即从git下载代码,并且ftp'到heroku)。

It does not seem like it is possible to FTP to heroku. 似乎无法通过FTP传输到heroku。 Is there some other way that front-end developers can interact with rails without having to install rails on their own? 前端开发人员是否可以通过其他方式与rails交互,而不必自己安装rails?

Thank you! 谢谢!

Greg 格雷格

I'll provide a sample of static html pages generated thanks to the actual application together with the css & js files. 我将提供一个由于实际应用以及CSS和JS文件而生成的静态html页面示例。 The only point missing is the ajax processes then. 唯一缺少的一点是ajax进程。

If he only needs to edit files (css, js, ...), he can just pull your code from git (in your case maintained by Heroku, I guess) and push back. 如果他只需要编辑文件(css,js等),他就可以从git中拉出您的代码(我猜是Heroku维护的情况),然后往回推。
But, I guess he'll also want to see how his changes look like, and for that he needs to run the rails server. 但是,我想他也想看看他的更改如何,为此,他需要运行rails服务器。
Check the Heroku toolbelt (or something similar to that), it's supposed to be easy to install and allows you to checkout code from heroku and run the server. 检查Heroku工具带(或类似的工具),它应该易于安装,并允许您从heroku中检出代码并运行服务器。 I've never used that but think I've heard about it once. 我从没使用过它,但想我曾经听说过它。

It is possible for him to do it without installing rails. 他有可能无需安装导轨就可以这样做。 He will need to use git however to push to heroku as it doesn't support ftp, partly because various processes are tied into the git pushes. 他将需要使用git来推送到heroku,因为它不支持ftp,部分原因是git推送中捆绑了各种进程。

I want to be clear though: Even with using git, I strongly recommend against it. 我想清楚一点:即使使用git,也强烈建议您反对。 Rails does a lot of processing around its view files, layouts, css, js, etc. and removing the ability to see what they look like as served up by the actual app is inviting problems. Rails对其视图文件,布局,css,js等进行了大量处理,并且删除了查看实际应用程序提供的外观的功能,这会引发问题。

One option you might consider is setting up the rails environment for the designer so that they don't have to learn much and they can be at the 'push a button or two' level. 您可能会考虑的一种选择是为设计人员设置Rails环境,这样他们就不必学习很多东西,并且可以处于“按下按钮或两个按钮”的级别。

Another option is that you basically become the 'master' and shuttle the files to and from the server and check them locally. 另一个选择是,您基本上成为“主”,将文件往返于服务器,然后在本地检查它们。 This is even more inefficient but of course could suit some bureaucracies or organizations. 这甚至效率更低,但是当然可以适合某些官僚机构或组织。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM