If you do, to test something out or what have you, run rails assets:clobber when you are done, to restore your assets to working in development mode. You generally should not run rails assets:precompile in development. you may or may not still be having problems with actual live-reload, but they'll be different problems - right now, you are having a different problem before you even get to live-reload. Now, try again all of the things you tried before - without the production-mode built assets in the way, you will be seeing different results. import 'pages/styleguide' This imports the partial just fine, but any changes to pages/styleguide.scss are not refresh unless I restart the gulp task however, any change to an scss file that is not imported (but instead included in the gulp task) is. Even if you disable live reloading entirely, you still aren't seeing CSS changes - even after restarting the server and hard-refreshing the browser, as you say. The kit includes a setup with a components.scss file and several imported partials (e.g. Which is what you are suggesting, right? This is actually a problem entirely separate from and unrelated to live-reloading. I use the underscore filename convention for my SCSS partials (), but guard-livereload isnt detecting changes to these files. If so, this is unrelated to "live reloading", you wouldn't/aren't seeing changes even upon manually reloading. Which is why you don't see changes until you run assets:precompile again. So, once you've run that ONCE, these production-mode built assets are there, and the Rails app it just using them and ignoring the development-mode stuff. ![]() The only thing that's updating the CSS is running 'rails assets:precompile' Try /r/railsjobs, /r/forhire, or the following job sites: Looking for work, or need to hire Rails developers? Ruby Doc: Complete and accurate documentation for the Ruby programming language.Rails API: Searchable docs built with the sdoc gem.APIdock: Rich and usable interface for searching, perusing and improving the documentation.Bundler: Manages an application's dependencies.Ruby Version Manager (RVM): alternative ruby environment manager.Rbenv: manage multiple ruby environments.Become A Ruby & Rails Developer In 90 Days.Learn Web Development with Rails (Tutorial Book).Hackety Hack is a shoes app for playing around with ruby.Try RubyKoans to learn more about syntax, structure, and common functions and libraries.Please message the mods if you would like to suggest changes to the sidebar. Make sure the only reported file is the compiled css. But since the livereload client doesn't know this file then it will reload the whole page. (you have it globally, take in only in the css) Because of this it will trigger a livereload event for the scss file as well. Posts about the Ruby programming language are encouraged to be posted in the /r/ruby subreddit. First of all don't enable livereload on for the compass task. ![]() Please check out the links in the wiki before posting.Ī subreddit for discussion and news about Ruby on Rails development Scroll down a bit more for great learning resources. Magento 2 native config reloader reloading just the styles, not page reload. If you still need help, please follow the rules in How do I ask for help? Learning ruby/rails? Added 'grunt-contrib-livereload': '0.1.2' to sass compile grunt config. I also installed the browser extension and enabled access to page URLS. ![]() Now start your gulp script again and it wont conflict. 3996 then run this command: kill -9 3996. This will then give you a list of proccesses running on this port, pick the first PID in the list i.e. Please make sure you've tried searching Google and StackOverflow. Issue compiling SASS and SCSS with LiveReload I just installed LiveReload on my Macbook running Catalina 10.15.6 (19G73). What you need to do is kill the service running on port 35729, you do this by running the following command from the terminal: lsof -iTCP:35729. ![]() This will add a local variable to your app under here to browse without help questions. livereload.js is loaded in the page but it doesn't seem to auto-refresh. The only thing that doesn't refresh is the browser. get ( 'env' ) = 'development' ) īy default this script tries to load the live reload script itself,īut if that doesn't work for some reason then you can put your app When I load run bundle exec guard, guard monitors my files properly so that when I save changes to a sass file it automatically recompiles. Var path = require ( 'path' ) var express = require ( 'express' ) var app = express ( ) if ( app.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |