Can you edit text directly on the server using Rails and Heroku?
I have website written in Rails. I constantly find myself tweaking page titles, intro text and all kinds o开发者_如何学Pythonf labels. After each change, I commit to Git and then upload to Heroku.
Is there a way to edit text directly on the server?
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.
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.
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)
精彩评论