d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Ruby On Rails Scss Help
Add Reply New Topic New Poll
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Sep 4 2016 02:37am
ok so ive been doing a ruby on rails tutorial : https://www.youtube.com/watch?v=eY1HCqe9MBc (that one to be exact)

im at the very end of the video where hes doing the scss

my problem is i cant get any css to actually load, ive tried precompiling switching config.static to true and several other things. just cannot get shit to load. im so mad cuz im almost done with his tutorials and im stuck on a fuckin css problem.

maybe someone can help?
Member
Posts: 3,386
Joined: May 4 2013
Gold: 1,780.00
Sep 4 2016 03:31am
Do you actually get .css generated at all? It should compile all app/assets/stylesheets/*.scss (and *.css too) into public/assets/application.css which you then load

You can try running scss manually, maybe there is some error preventing it from working. scss --watch --update app/assets/stylesheets/:public/assets/ (this will change eg. foo.scss to foo.css and foo.css.map. But it is just a test here)

This post was edited by nuvo on Sep 4 2016 03:32am
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Sep 4 2016 12:17pm
Quote (nuvo @ Sep 4 2016 09:31am)
Do you actually get .css generated at all? It should compile all app/assets/stylesheets/*.scss (and *.css too) into public/assets/application.css which you then load

You can try running scss manually, maybe there is some error preventing it from working. scss --watch --update app/assets/stylesheets/:public/assets/ (this will change eg. foo.scss to foo.css and foo.css.map. But it is just a test here)


im using rails 4.2.6 and all my scss files including application.css are in app/assets/stylesheets theres no css/scss in the public directory.

edit:

i think it might have something to do with this (app/views/layouts/application.html.erb):
Code
<!DOCTYPE html>
<html>
<head>
<title>Spblog</title>
<%= stylesheet_link_tag "defaults", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "defaults", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>


im on windows so I cant use <%= stylesheet_link_tag "application", as i get an unkown property method error.

but im not 100% sure..

This post was edited by AkuuZ on Sep 4 2016 12:26pm
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Sep 4 2016 12:59pm
i dont think its getting any of the asset files, i tried a simple alert in the articles.coffee in app/assets/javascripts and it doesnt work either
Member
Posts: 3,386
Joined: May 4 2013
Gold: 1,780.00
Sep 4 2016 02:10pm
pastebin the source you get when viewing page? How do you actually start it?

Being on windows should have zero effect on templating language, but maybe you have fucked up source somewhere. Link to source? (use github)

This post was edited by nuvo on Sep 4 2016 02:10pm
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Sep 4 2016 05:51pm
Quote (nuvo @ Sep 4 2016 08:10pm)
pastebin the source you get when viewing page? How do you actually start it?

Being on windows should have zero effect on templating language, but maybe you have fucked up source somewhere. Link to source? (use github)


I installed node and it works now. It was an execsJS problem. Something weird that happens with the base windows runtime.
Member
Posts: 3,386
Joined: May 4 2013
Gold: 1,780.00
Sep 5 2016 03:23am
Install vagrant and deploy to linux vm

or just install real system, not the handicapped useless windows
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Sep 6 2016 08:39pm
Quote (nuvo @ Sep 5 2016 09:23am)
Install vagrant and deploy to linux vm

or just install real system, not the handicapped useless windows


haha yea, i thought about getting a linux virtual machine or a buying a mac

oh an thanks for your help

This post was edited by AkuuZ on Sep 6 2016 08:42pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll