jjzjj

Precompile

全部标签

ruby-on-rails - rails Assets :precompile Yarn executable was not detected in the system

我使用的是基于Ubunt17.04的Linux18。当我运行railsassets:precompile时,我收到以下消息Yarnexecutablewasnotdetectedinthesystem当我按照Post中的安装说明进行操作时或在Webpage上,我成功安装了Yarn,但rails一直给我错误我注意到node.jsLinuxMint的系统包高达17.2版本,我尝试执行Yarn页面的所有说明并手动安装node.js已经安装在我的系统中。该消息并没有真正解释问题。如果我运行yarn--help它会工作并且我的yarn--version是0.22这是我的LinuxMint系统DI

ruby-on-rails - 在 Heroku 上预编译失败,initialize_on_precompile 设置为 false

我有一个应用程序正在尝试部署到Heroku的cedar堆栈。在部署的预编译阶段,出现错误:Yourbundleiscomplete!Itwasinstalledinto./vendor/bundleCleaningupthebundlercache.----->Writingconfig/database.ymltoreadfromDATABASE_URL----->PreparingappforRailsassetpipelineRunning:rakeassets:precompilerakeaborted!couldnotconnecttoserver:Connectionref

ruby-on-rails - 当我运行 rake assets :precompile got couldn't find file 'jquery' in application. js on//= require jquery

当我运行时bundleexecrakeassets:precompile我得到了couldn'tfindfile'jquery'在application.js上线://=requirejqueryrails3.2.2。什么是原因? 最佳答案 我敢说您的应用程序中没有任何jquery.js文件。如果它不在app/assets或vendor/assets或lib/assets中,请将其添加到其中之一——或者如果您使用的是jquery-railsgem,请按照说明进行操作here. 关于rub

ruby-on-rails - Assets :precompile end of file reached

我正在尝试在我的Rails4应用程序上运行assets:precompile,但我不断收到:rakeaborted!endoffilereached在capistrano提示同样的错误后,我在我的VPS上运行这个命令。有什么想法吗?[deploy@skateboxesskateboxes]$cd/var/www/skateboxes/releases/20131024204508&&(RAILS_ENV=production/usr/local/rvm/bin/skateboxes_rakeassets:precompile)rakeaborted!endoffilereached/v

ruby-on-rails - Heroku run rake assets :precompile is FAILING?(无法转储匿名类)

这是跟踪输出:这是什么:can'tdumpanonymousclass东西?不知道我还能尝试什么。我真的很欢迎你的帮助。谢谢!!herokurunrakeassets:precompile--traceRunning`rakeassets:precompile--trace`attachedtoterminal...up,run.1662**Invokeassets:precompile(first_time)**Invokeassets:environment(first_time)**Executeassets:environment**Invokeenvironment(firs

ruby-on-rails - 运行抽佣 Assets :precompile fails when there's no tables (yet)

只要数据库是干净的,没有表,这在测试和设置要部署的新服务器时经常发生,许多rake任务,如assets:precompile,会失败并出现此错误:rakeaborted!PG::Error:ERROR:relation"users"doesnotexistLINE4:WHEREa.attrelid='"users"'::regclass^:SELECTa.attname,format_type(a.atttypid,a.atttypmod),d.adsrc,a.attnotnullFROMpg_attributeaLEFTJOINpg_attrdefdONa.attrelid=d.ad

ruby-on-rails - 运行 'rake assets:precompile' 产生错误 : '` @application. css' is not allowed as an instance variable name'

我正在开发一个Rails3.2应用程序,我正在尝试测试预编译我的Assets,以便在我将我的应用程序投入生产时使用。该应用程序在开发中运行良好,但当我运行时:bundleexecrakeassets:precompile我收到以下错误:rakeaborted!`@application.css'isnotallowedasaninstancevariablename我搜索了我的代码,没有对application.css的引用,当然除了那个名称的文件(以及偶尔的评论)。我也试过在生产模式下设置config.assets.compile=true,但也失败了(应用服务器启动正常,但在pro

ruby-on-rails - 运行抽佣 Assets :precompile before tests that include :js tag and skip otherwise

tl;博士——是否可以仅在测试主体中包含:js测试时运行单个命令(例如rakeassets:precompile)跑?--我正在开发一个Rails5、Ruby2.3.1应用程序,它有一个大型rspec测试套件。我们最近在应用程序中安装了webpackergem,这导致我们必须运行:$bundleexecrakeassets:precompile在运行测试之前。如果没有运行上述命令,测试将针对最近预编译的Assets运行。这引起了一些麻烦,因为开发人员忘记了这一步,然后用头撞墙,直到有人记得在运行测试套件之前运行它。理想情况下,我想简单地添加到spec/spec_helper.rb:co

ruby-on-rails - 在 Rails 中使用 config.assets.precompile 将 Assets 包含在子目录中

我有一个在Heroku上运行的Rails3.1.3应用程序,利用S3通过asset_sync进行Assets托管。我的app/assets/css目录中包含一个包含两个文件的子目录:main.css.scss和categories.css.scss。我的production.rb中有以下行:config.assets.precompile+=['admin/main.css.scss','admin/categories.css.scss','print.css','products.css.scss','services.css.scss']当我推送到Heroku时,除了这两个文件外

ruby-on-rails - Assets :Precompile too verbose

我是JRuby和Rails的新手。当我预编译我的Assets时,它会用我不感兴趣的垃圾填满我的日志。(在/srv/test/releases/cba9797f510b211ff3568c9bb800ee7a7366c319)mkdir-p/srv/test/releases/cba9797f510b211ff3568c9bb800ee7a7366c319/public/assetsmkdir-p/srv/test/releases/cba9797f510b211ff3568c9bb800ee7a7366c319/public/assets/Controllermkdir-p/srv/t