小编use*_*896的帖子

Git:检索特定提交

我需要在git存储库中将一组提交导出到存档.我该怎么做呢?使用svn,我可以选择提交并导出到zip.

git export commit

12
推荐指数
2
解决办法
9390
查看次数

如何在rails_admin中自定义编辑和更新操作

我正在使用rails_admin,我觉得它很棒.不幸的是,我无法覆盖特定模型上的特定操作.我只需要在一个模型上覆盖编辑和更新行为.任何的想法?

customization ruby-on-rails controller-action rails-admin

10
推荐指数
1
解决办法
1641
查看次数

如何通过Rails实现基于websocket的推送服务?

我正在构建像WhatsApp这样的消息传递应用程序.我的目标是通过Rails只暴露REST API,并通过websockets将"推送通知"暴露给连接的客户端.因此,客户端仅使用REST API与服务器通信.只有服务器通过websocket发送数据.客户端只能从中接收数据.

目前我已经构建了一个eventmachine服务器,用于监听websocket连接和Unix域套接字连接.当客户端在REST API上执行请求时,Rails会连接到Unix域套接字,以告知事件处理器需要通过websocket通知哪些连接的客户端.

我关心的是它在生产中的表现(我的服务器运行Apache Passenger).所以我正在寻找一些解决我问题的项目.我看了看Faye,但我无法理解如何强制它从外部进程(在执行请求时可能是rails)向连接的客户端发送通知.有任何想法吗?

ipc ruby-on-rails websocket faye em-websocket

7
推荐指数
1
解决办法
1263
查看次数

未找到Silex路由

我第一次使用Silex.在本地开发的同时一切正常.一旦将所有内容上传到生产服务器,参数化路由就不再起作用了.

你有什么主意吗?
我错过了某处的生产配置吗?
我在哪里丢失了文件权限?

我有两个例外:

NotFoundHttpException: No route found for "GET /prevendita/hello/sadfasdf"
in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 92
  at RouterListener->onKernelRequest(object(GetResponseEvent))
  at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 164
  at EventDispatcher->doDispatch(array(array(object(Application), 'onEarlyKernelRequest'), array(object(SessionServiceProvider), 'onEarlyKernelRequest'), array(object(RouterListener), 'onKernelRequest'), array(object(LocaleListener), 'onKernelRequest'), array(object(Application), 'onKernelRequest')), 'kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 53
  at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 110
  at HttpKernel->handleRaw(object(Request), '1') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
  at HttpKernel->handle(object(Request), '1', true) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 509
  at Application->handle(object(Request)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 484
  at Application->run() in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/web/index.php line 49
Run Code Online (Sandbox Code Playgroud)

和:

ResourceNotFoundException:
in …
Run Code Online (Sandbox Code Playgroud)

php url-routing silex

6
推荐指数
1
解决办法
7834
查看次数

Rails_admin 任意打开模态表单

您好,我正在使用 Rails Admin,我需要在某些模型上打开任意模式表单。为了简单起见,我想要一个链接,单击后会打开一个模式表单。我虽然这只是在触发模式形式的链接上设置什么类和“data-*”属性的问题,但看起来更复杂。我该如何实现这一目标?我一直在 gem 中浏览部分视图和 javascript,试图了解如何实现此功能,例如在一对多关系上,但代码有点超出我的知识范围,我无法完成此操作。谢谢

modal-dialog rails-admin

6
推荐指数
1
解决办法
1399
查看次数