webpack-rails | Integrate webpack with your Ruby on Rails | Application Framework library
kandi X-RAY | webpack-rails Summary
kandi X-RAY | webpack-rails Summary
Integrate webpack with your Ruby on Rails application
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the next message .
- = begin Function
- run the yaml
webpack-rails Key Features
webpack-rails Examples and Code Snippets
Community Discussions
Trending Discussions on webpack-rails
QUESTION
For those familiar with the react-on-rails gem, or more generally, yarn:
Just today I updated my Node version to 8.8.1 via Homebrew. Now, when I attempt to run bundle && yarn && foreman start -f Procfile.dev
(or just yarn install), I get the following message:
error react-webpack-rails-tutorial@0.0.1: The engine "node" is incompatible with this module. Expected version "5.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
This is likely a very simple issue I am running into, but I have been unable to fix it after a few hours of debugging.
I tried manually updating my Node version in package.json to be that on my computer (did not seem to take effect whatsoever), downgrading my version to 5.10.0 via Homebrew (but was unable to), and even upgrading to the latest version of the gem which meant installing webpack as well.
No matter what I did, my local server startup (bundle && yarn && foreman start -f Procfile.dev
) still lead to the same error above. Any ideas for this poor soul?
ANSWER
Answered 2017-Oct-30 at 09:29I give you this list of checks to do from the react-webpack-rails-tutorial
github page
Basic Demo Setup
Be sure that you have Node installed! We suggest nvm, with node version v6.0 or above. See this article Updating and using nvm.
git clone git@github.com:shakacode/react-webpack-rails-tutorial.git cd react-webpack-rails-tutorial
- Check that you have Ruby 2.3.0 or greater
- Check that you're using the right version of node. Run nvm list to check. Use 5.5 or greater.
- Check that you have Postgres installed. Run which postgres to check. Use 9.4 or greater.
- Check that you have qmake installed. Run which qmake to check. If missing, follow these instructions: Installing Qt and compiling capybara-webkit
- Check that you have Redis installed. Run which redis-server to check. If missing, install with Homebrew (brew install redis) or follow these instructions.
- bundle install
- brew install yarn
- yarn
- rake db:setup
- foreman start -f Procfile.hot
- Open a browser tab to http://localhost:3000 for the Rails app example with HOT RELOADING
- Try Hot Reloading steps below!
- foreman start -f Procfile.static
- Open a browser tab to http://localhost:3000 for the Rails app example.
- When you make changes, you have to refresh the browser page.
QUESTION
I'm upgrading my Gitlab install but have an issue: the migration fails because it misses a dependency. Which look installed. That's weird.
...ANSWER
Answered 2018-Jan-22 at 11:13I fixed it by dropping all installed dependencies:
QUESTION
I followed the webpack-rails gem documentation steps to install the webpacker on my rails app.
Once I ran bundle exec rails generate webpack_rails:install
all files were generated and foreman
was added to the gem file. Then again I did bundle install
. After that I did
foreman start
as stated in documentation.
Then I got this error.
...ANSWER
Answered 2017-Dec-16 at 16:57This gem refers to yarn
for bundling node packages (you can also use straight npm). Per the gem tough, you need to install yarn then you need to run
QUESTION
My Webpack is compiling properly on my development environment, but once I deploy to Heroku, I'm receiving an error that Chart.js isn't a module-
...ANSWER
Answered 2017-Mar-29 at 16:24From the first line in your log: npm install --only=dev
it looks like you are only pulling devDependencies
. chart.js
is registered in dependencies
so using --only=dev
will not download chart.js
.
To read about the --only
switch, here is the documentation.
I would suggest that you remove the --only
flag from the npm install
if possible.
QUESTION
I'm trying to run npm install
inside my vagrant box but get this error:
ANSWER
Answered 2017-Jan-09 at 14:48I was struggling with this exact issue for quite a while as well. I was able to resolve it with the advice on here - https://github.com/mitchellh/vagrant/issues/7163
Scroll down to the second last comment and follow those steps to move your node_modules folder out of the shared folder, that should fix everything for you.
For ease here's the comment
There are some issues with installing the node packages directly in the shared folder. A good workaround is to install the packages somewhere inside the vm then create a symlink.
Ex:
cd /vagrant
rm -rf node_modules
mkdir /home/vagrant/vagrant_node_modules
cp package.json /home/vagrant/vagrant_node_modules
cd /home/vagrant/vagrant_node_modules
npm install
cd /vagrant
ln -s /home/vagrant/vagrant_node_modules/node_modules node_modules
ls -ld node_modules
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webpack-rails
Add webpack-rails to your gemfile
Run bundle install to install the gem
Run bundle exec rails generate webpack_rails:install to copy across example files
Run foreman start to start webpack-dev-server and rails server at the same time
Add the webpack entry point to your layout (see next section)
Edit webpack/application.js and write some code
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page