问题标签 [discourse]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
asp.net - 将 Discourse 与 ASP.NET 成员表集成?
是否可以将 Discourse 论坛软件 ( http://www.discourse.org/ ) 与我的 asp.net 会员表集成?有什么例子吗?
ruby-on-rails - 使用 rbenv 的 Discourse bluepill
在官方话语库中有一个用于bluepill gem的discourse.pill文件,它使用 rvm。
因为我使用的是 rbenv,所以我需要那个脚本来使用 rbenv(而且我不擅长环境的东西)。
我如何转换这个脚本,可能只有这段代码?
ruby-on-rails - 迁移话语服务器
我正在迁移到新服务器,因此我已将图片文件夹存档public/uploads/default
,压缩并将它们移动到我的新服务器并放入shared/public/assets/default
.
当我做 cap deploy 时,capistrano 将它们删除为
据我了解,这些图片不是清单的一部分。那么我怎样才能保留这些图片并将它们整合到项目中呢?谢谢
export - Vagrant 错误:NFS 报告您的导出文件无效
我正在尝试使用这些说明设置 Discourse 开发环境。但是,当我运行 Vagrant 时,出现错误:
NFS 报告您的导出文件无效。Vagrant 在对文件进行任何更改之前会进行此检查。请更正以下问题并执行“vagrant reload”:
无法打开 /etc/exports
我查了一下,没有 etc/exports 文件夹,所以我创建了一个并运行vagrant reload
. 这让我:
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/hosts/bsd/host.rb:146:in
read': Is a directory - /etc/exports (Errno::EISDIR) from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/hosts/bsd/host.rb:146:in
nfs_prune' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/ plugins/synced_folders/nfs/synced_folder.rb:68:incleanup' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:24:in
block in call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:22:ineach_key' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:22:in
来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4 .1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in
来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/env_set.rb:19:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4 .1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/provision.rb:52:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:13:in
call '来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4 的 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/set_name.rb:19:in
call'。 1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in
call'来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in
阻止来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in call' 的 finalize_action' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant -1.4.1/lib/vagrant/action/runner.rb:69:in busy' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in run' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant- 1.4.1/lib/vagrant/action/builtin/call.rb:51:in call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/config_validate.rb :25:在call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 的 finalize_action' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant -1.4.1/lib/vagrant/action/builder.rb:116:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
block in run' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb: 19:busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
运行中'来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call'来自/Applications/Vagrant/embedded/gems/ gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb :34:在call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in
block in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:in
块在 finalize_action' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant- 1.4.1/lib/vagrant/action/builder.rb:116:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
block in run' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19 :在busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox。 rb:17:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:57:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/ gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action /builtin/config_validate.rb:25:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:95:inblock in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4 .1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
busy '来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inrun' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builtin/call.rb:51:in
call'来自/Applications/Vagrant/embedded/gems/gems/vagrant-1.4。 1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in
call' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:incall' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/builder.rb:116:in
call'来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/util/busy.rb:19:in
来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4 的 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/action/warden.rb:34:in busy' 的.1/lib/vagrant/action/runner.rb:69:inrun' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/machine.rb:147:in
action' 来自 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/reload/command.rb:37:inblock in execute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:193:in
块在 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191 中的each' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/plugin/v2/command.rb:191:in
with_target_vms 中:在 /Applications/Vagrant/embedded/gems/gems/中的 with_target_vms 中vagrant-1.4.1/plugins/commands/reload/command.rb:36:inexecute' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/cli.rb:38:in
从 /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:484:in 执行cli' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:127:in
' 来自 /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:inload' from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
'
我在 Mac (OS X 10.6.8) 上。我该如何解决?我尝试搜索原始错误消息,但我发现的只是一些包含抛出它的 Vagrant 源代码的存储库。
ember.js - 如何从控制器获取对当前路由的引用?
我有一个控制器 ( ),它通过模板中KbRelatedGroupController
的帮助程序加载。{{render}}
在控制器的操作中,如果我这样做this.get('target')
,它会返回对页面(KbShowController
)的父控制器的引用。
如果我调用.target
它,我会得到对 的引用Discourse.Router
,这对我没有好处。
我想要的是对 a 的引用KbShowRoute
,这就是我所期望的,因为.target
当从控制器调用时应该产生 Route 不是吗?
这里真是一头雾水。为什么从控制器获取对当前路由的引用如此困难?
ruby-on-rails - 在这部分代码中设置 klass = self 的动机是什么
我正在查看一些讨论中的代码并偶然发现了这一点,并且想知道为什么 klass = self. 我知道他们是比我更好的 ruby 开发人员,这一定是有充分理由的。
他们为什么不调用 self.remove_from_cache!(message["key"], false)?该块是否创建了一个新范围,其中 self 指的是 MessageBus 类?是否还有其他示例说明您需要在 Ruby 中创建这种类型的构造,或者这是主要的构造?如果 MessageBus.subscribe 是 MessageBus 的一个实例(比如 m_bus.subscribe),是否会在块中自己引用 m_bus?ensure_class_listener 是类方法这一事实对此有什么影响吗?抱歉所有问题,但只是想确定一下。
谢谢
https://github.com/discourse/discourse/blob/master/app/models/site_customization.rb#L118
编辑#1
MessageBus.subscribe 的实现似乎在这里: https ://github.com/SamSaffron/message_bus/blob/master/lib/message_bus.rb#L217
apache - 在一台服务器上讨论 Docker 和 Apache
嗨,我在同一个 Ubuntu 12.04 服务器上通过 Docker 和 Apache 服务器安装了 Discourse。
Discourse 容器暴露在 81 端口,Apache 在 80 端口。
如何设置 Apache 以显示 Apache web 像“something.com”和话语 docker 像“forum.something.com”这样的东西。
我将它用于 Discourse:https ://github.com/discourse/discourse_docker
ajax - 在 nginx discourse.conf 中添加访问控制允许来源
所以我有一个应用程序,forums.awake-gaming.com
并且有一个页面,通过 ajax可以在该页awake-gaming.com
面上POST
使用表单。forums.awake-gaming.com
正如预期的那样,我得到了一个
因此,由于我可以访问服务器,因此我将其添加到discourse.conf
目录下的文件中nginx/conf.d
。
我重新启动了 nginx 并尝试再次提交表单,理论上,这应该可以工作,但我仍然在控制台中遇到相同的错误:
ajax 调用也没有返回成功。但奇怪的是,数据被发布到forums.awake-gaming.com
并被发布(通过话语 api)。
那我是不是错了?,我试图在 meta.discourse.org 上提问,但他们说这是 nginx 的问题,而不是话语的问题。在文件中添加标题.conf
就足够了吗?或者我也需要用rails做点什么?