简体   繁体   English

捆绑exec rake资产:生成的application.js文件的预编译问题

[英]bundle exec rake assets:precompile issue with the generated application.js file

I could successfully host the fulcrum app on phusion but I am going nuts with some configuration issue 我可以在phusion上成功托管支点应用程序 ,但是我在某些配置问题上大失所望

The application is picking up the url as 应用程序将网址提取为

http://example.com/projects/4

instead of 代替

http://example.com/fulcrum/projects/4

Could anyone point the mistake. 任何人都可以指出错误。 I tried to change the assets.prefix in production.rb and recompile the assets but it only changes the location of the assets but doesn't change the root url in application.js 我试图更改production.rb中的assets.prefix并重新编译资产,但它仅更改资产的位置,而不更改application.js中的根URL

THe app is hosted at 该应用托管于

http://example.com/fulcrum 

And the rest of the site is functional except for this jquery/ajax part. 除此jquery / ajax部分外,该网站的其余部分均正常运行。

Setting config.action_controller.asset_host = "http://example.com/fulcrum" in your production.rb should do the trick. 在production.rb中设置config.action_controller.asset_host = "http://example.com/fulcrum"应该可以解决问题。

If you're sending emails you should set config.action_mailer.asset_host too. 如果要发送电子邮件,则也应该设置config.action_mailer.asset_host

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

相关问题 捆绑exec rake资产:生成的文件预编译问题 - bundle exec rake assets:precompile issue with the generated files 捆绑exec rake资产:预编译 - bundle exec rake assets:precompile rake预编译资产在rake资产时失败:预编译 - 基本上是空的application.js - RoR Precompiling Assets fail while rake assets:precompile - on basically empty application.js 命令捆绑exec rake asset:precompile错误 - error with the command bundle exec rake assets:precompile 当我运行rake资产时:precompile得不到app.js中的文件'jquery'// = require jquery - when I run rake assets:precompile got couldn't find file 'jquery' in application.js on //= require jquery 捆绑exec rake资产:预编译失败 - bundle exec rake assets:precompile fails 捆绑exec rake资产:预编译-不断失败 - bundle exec rake assets:precompile - keeps failing 捆绑包执行佣金前资产后,OpsWorks部署失败:预编译 - OpsWorks deploy failed after bundle exec rake assets:precompile bundle exec rake assets:precompile - 数据库配置没有指定适配器 - bundle exec rake assets:precompile - database configuration does not specify adapter 捆绑包执行佣金资产:在开发环境中预编译失败 - bundle exec rake assets:precompile fails in Dev Environment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM