【问题标题】:Sprockets::FileNotFound: couldn't find file 'jquery' openprojectSprockets::FileNotFound: 找不到文件 'jquery' openproject
【发布时间】:2014-10-16 16:28:19
【问题描述】:

我尝试在 Windows 7 64 位中安装 openproject。

我按照openproject wiki中提到的步骤,但无法成功安装,查看错误日志

openproject>bundle exec rake assets:precompile
DL is deprecated, please use Fiddle
require 'rails/all'... 1.887s
Bundler.require... 4.181s
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
Application.initialize!... [deprecated] I18n.enforce_available_locales will defa
ult to true in the future. If you really want to skip validation of your locale
you can set I18n.enforce_available_locales = false to avoid this message.
13.447s
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery'
  (in C:/OpenProject/openproject/app/assets/javascripts/application.js.erb:13)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

当我尝试this Stakeoverflow 解决方案时,出现以下错误

openproject>bundle exec rake assets:clean assets:precompile
DL is deprecated, please use Fiddle
require 'rails/all'... 1.934s
Bundler.require... 4.321s
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
Application.initialize!... [deprecated] I18n.enforce_available_locales will defa
ult to true in the future. If you really want to skip validation of your locale
you can set I18n.enforce_available_locales = false to avoid this message.
13.135s
rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery-migrate/jquery-migrate'
  (in C:/OpenProject/openproject/app/assets/javascripts/application.js.erb:14)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

现在我在安装的最后一步走投无路。任何人帮我解决这个问题。

提前致谢。

【问题讨论】:

  • 这只是一个猜测,但从我在 OpenProject 源代码中可以看到,有一个 bower.json。你跑bower install了吗?
  • 我在 openproject 文件夹中没有看到任何 bower.json,我检查了 openproject 的 stable 分支
  • 我检查了开发版本,然后我得到了 bower.json,感谢@Martin

标签: jquery ruby-on-rails openproject


【解决方案1】:

jquery-migrate 被添加到dcde12a2277 中,它不是当前稳定分支的一部分。它目前只是 dev 分支的一部分(即将成为 4.0)。所以你似乎在 dev 分支上。

鉴于 OP 4.0 即将发布,我建议您坚持使用 dev 分支,这样您就可以省去从 3.0 升级到 4.0 的工作。

如果您本人不是 Windows 用户,如果您打算使用即将发布的 4.0 版本,Martin 的建议是正确的,您需要安装 bower。 bower 页面说明了方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-02-24
    • 2015-02-14
    • 2020-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多