您可以使用 Rails 和 Heroku 直接在服务器上编辑文本吗?
我有用 Rails 编写的网站。我经常发现自己在调整页面标题、介绍文本和各种标签。每次更改后,我都会提交到 Git,然后上传到 Heroku。
有没有办法直接在服务器上编辑文本?
I have website written in Rails. I constantly find myself tweaking page titles, intro text and all kinds of labels. After each change, I commit to Git and then upload to Heroku.
Is there a way to edit text directly on the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
一般来说,频繁提交和不频繁推送到生产环境是一个好主意。改变生产并不是一个好主意。
It's generally a good idea to make frequent commits and less frequently make pushes to production. Making changes in production isn't a great idea.
在生产服务器上进行更改并不容易,这是有原因的。如果你的开发人员犯了错误。机器,最终用户不会出现任何问题。但是,如果生产服务器出现问题怎么办?突然之间,事情可能会变得混乱,您的用户现在会遇到错误页面。
是的,到处进行这些小调整是很乏味的,但是我会向生产服务器进行更大的推送,以最大程度地减少您当前遇到的烦恼。
There is a reason why it isn't easy to make changes on the production server. If you make a mistake on your dev. machine, nothing goes wrong for the end user. However, what if you mess up on the production server? All of a sudden things can go haywire and your users are now hitting an error page.
Yes it is tedious to make these small tweaks here and there, however I would make bigger pushes up to the production server to minimize the annoyance you are currently experiencing.
您可以使用数据库后端来存储区域设置文件。请参阅此 gem 了解更多详细信息。
这样,您不必每次更改标签文本时都将代码提交/推送到服务器。
您可以更改生产中的区域设置表内容以进行所需的更改。
You could use a DB back-end for the locale files. Refer to this gem for more details.
This way, you don't have to commit/push the code to server every-time you change a label text.
You can change the locale table content in production to make the required changes.
http://copycopter.com
可能值得一试。 (我不隶属,也没有实际使用过这项服务)
A cool-looking service aimed at just this is http://copycopter.com
Might be worth checking out. (I am not affiliated and have not actually used this service)