webpacker

Why does Capistrano deployment fail at assets:precompile without error?

末鹿安然 提交于 2021-01-28 01:13:23
问题 I've tried everything I could think of, but I can't get deployment to work. The app needs to deploy to a VPS hosted by Alwaysdata and running ruby 2.6.2, using Capistrano for deployment. It's a Rails 6.0.2.2 application, using webpack for JS and sprockets for legacy scripts, all images and CSS. # On local machine (MacOS) $ bundle exec cap production deploy 00:00 git:wrapper 00:01 git:check 00:03 deploy:check:directories 00:03 deploy:check:linked_dirs 00:03 deploy:check:make_linked_dirs 00:05

How to Import node_modules with Webpacker

♀尐吖头ヾ 提交于 2021-01-27 19:41:59
问题 I'm new to the whole JS/webpacker game and am failing to understand how to import and use a javascript package using webpacker. I am trying to include and use the Animate On Scroll Library. I have Webpacker installed and working (I know it's working because I am able to happily use StimulusJs). Here's what my /javascript/packs/application.js file looks like: import { Application } from "stimulus" import { definitionsFromContext } from "stimulus/webpack-helpers" import { trix } from "trix"

How to Import node_modules with Webpacker

萝らか妹 提交于 2021-01-27 19:17:17
问题 I'm new to the whole JS/webpacker game and am failing to understand how to import and use a javascript package using webpacker. I am trying to include and use the Animate On Scroll Library. I have Webpacker installed and working (I know it's working because I am able to happily use StimulusJs). Here's what my /javascript/packs/application.js file looks like: import { Application } from "stimulus" import { definitionsFromContext } from "stimulus/webpack-helpers" import { trix } from "trix"

Using Rails 6, where do you put your “page specific” JavaScript code?

纵饮孤独 提交于 2021-01-20 18:01:50
问题 My question here is the same as Using Rails 3.1, where do you put your "page specific" JavaScript code?, just for Rails 6 instead of Rails 3.1. Suppose I have some JavaScript that I want to use for my posts index page. Where do I put that file, and how do I include it? In the previous question the answers usually utilize the Rails Asset Pipeline. However, with Rails 6, my understanding is that it uses webpacker instead of the Asset Pipeline for JavaScript files. Note: I don't want the file to

rails 6 webpacker in production: rake assets:precompile fails

故事扮演 提交于 2021-01-07 21:40:53
问题 I have a typical rails 6.0.2 app set up on a production server and I'm using git hooks to deploy the app. When I try to run: rails assets:precompile I get the following error: rake aborted! Sprockets::ArgumentError: link_directory argument must be a directory /home/user/myapp/app/assets/config/manifest.js:2 Here is the manifest.js file //= link_tree ../images //= link_directory ../stylesheets .css I cant figure out what Im doing wrong. Unless I'm mistaken, doesn't webpacker replace sprockets?

rails 6 webpacker in production: rake assets:precompile fails

前提是你 提交于 2021-01-07 21:32:46
问题 I have a typical rails 6.0.2 app set up on a production server and I'm using git hooks to deploy the app. When I try to run: rails assets:precompile I get the following error: rake aborted! Sprockets::ArgumentError: link_directory argument must be a directory /home/user/myapp/app/assets/config/manifest.js:2 Here is the manifest.js file //= link_tree ../images //= link_directory ../stylesheets .css I cant figure out what Im doing wrong. Unless I'm mistaken, doesn't webpacker replace sprockets?

rails 6 webpacker in production: rake assets:precompile fails

允我心安 提交于 2021-01-07 21:30:34
问题 I have a typical rails 6.0.2 app set up on a production server and I'm using git hooks to deploy the app. When I try to run: rails assets:precompile I get the following error: rake aborted! Sprockets::ArgumentError: link_directory argument must be a directory /home/user/myapp/app/assets/config/manifest.js:2 Here is the manifest.js file //= link_tree ../images //= link_directory ../stylesheets .css I cant figure out what Im doing wrong. Unless I'm mistaken, doesn't webpacker replace sprockets?

How do I load local fonts with @rails/webpacker?

你说的曾经没有我的故事 提交于 2020-12-29 12:37:46
问题 I’m having an issue loading local font files with @rails/webpacker . The fonts are loaded in the development environment but not in the production environment. It seems like a really simple issue but I have just had so much trouble with it. Below is my @font-face code. My fonts are stored in app/assets/images/fonts app > assets > stylesheets >config > _fonts.scss @font-face { font-family: "Axiforma"; src: url("fonts/Kastelov-AxiformaRegular.eot"); /* IE9 Compat Modes */ src: url("fonts

How to integrate JqTree in Rails 6 with webpacker, tree is not a function

喜你入骨 提交于 2020-12-04 08:22:18
问题 I am really wanting to know how to integrate jqTree as a webpacker webpack in my Rails 6 application UPDATE:- Using yarn add jqtree seems to have magically cleared up most of my issues however I am currently facing tree is not a function error I am using the Ancestry gem to organise menu items and I need a drag and drop javascript tree view solution that will work nicely with the Ancestry gem. I have picked on jqTree as my desired solutions but I am happy to be persuaded to use an alternative

How to integrate JqTree in Rails 6 with webpacker, tree is not a function

柔情痞子 提交于 2020-12-04 08:22:14
问题 I am really wanting to know how to integrate jqTree as a webpacker webpack in my Rails 6 application UPDATE:- Using yarn add jqtree seems to have magically cleared up most of my issues however I am currently facing tree is not a function error I am using the Ancestry gem to organise menu items and I need a drag and drop javascript tree view solution that will work nicely with the Ancestry gem. I have picked on jqTree as my desired solutions but I am happy to be persuaded to use an alternative