简体   繁体   English

SONAR-编辑红宝石代码

[英]SONAR - editing ruby code

I have been tweaking Ruby code on sonar 2.13.1 for a couple of days. 我已经在声纳2.13.1上调整Ruby代码几天了。 Investigations lead me to useful tip, that if I set "rails.env" to "development" I can edit ruby code without restarting the server - it worked, but for reasons I can't figure out - non of the JS, jQuery, AJAX scripts are working and no CS Sheets are loading (just raw HTML). 调查为我提供了有用的提示,即如果我将“ rails.env”设置为“ development”,则可以在不重启服务器的情况下编辑ruby代码-它可以正常工作,但由于我无法弄清楚-非JS,jQuery, AJAX脚本正在运行,没有CS表格正在加载(仅原始HTML)。 I can deal without CSS but scripts are a part of functionality... 我可以不用CSS但脚本是功能的一部分...

And while on the same topic, in sonar 2.11 there was some higher level of debugging Ruby code, where if exception is thrown, the page renders an error, with some information about what happened - on 2.13.1 this is replaced by a message "Something went wrong". 而在同一主题中,在声纳2.11中,进行了更高级别的Ruby代码调试,如果引发异常,则页面将显示错误,并提供有关发生的情况的信息-在2.13.1上,该错误由消息“出问题了”。

Maybe someone could help with these two problems mentioned above ? 也许有人可以帮助解决上述两个问题?

A very easy way to modify Ruby templates, HTML, CSS, images, ...etc without the need to restart the server is to run the "sonar/sonar-server/*-start.sh" scripts (replace * with the kind of database you are using - hopefully MsSql/Postgres/Derby). 无需重启服务器即可修改Ruby模板,HTML,CSS,图像等的一种非常简单的方法是运行“ sonar / sonar-server / *-start.sh”脚本(用*替换*您正在使用的数据库-希望是MsSql / Postgres / Derby)。 This is what we use for our daily developments. 这就是我们日常使用的东西。

And when you get error, the best place to look at is the log that is printed out in the console where you started the "*-start.sh" script. 而且,当您收到错误消息时,最好的地方是在启动“ * -start.sh”脚本的控制台中打印出的日志。

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

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