How to use css on heroku

50 views
Skip to first unread message

Duong vong veasna

unread,
Jun 9, 2014, 4:22:07 AM6/9/14
to rubyonra...@googlegroups.com
Dear all Rails Developers,

I have problem on stylesheet.
i use <% stylesheet_link_tag 'style.css' %>
It work properly in local machine, but when i deployed it to heroku my style doesn't work.
how do i fix this?

thanks.

veasna.

Patrício dos Santos

unread,
Jun 9, 2014, 6:15:07 AM6/9/14
to rubyonra...@googlegroups.com
No arquivo config/enviroments/production.rb

altere a linha:

config.assets.compile = false

Para:

config.assets.compile = true


Cumps


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/52d5d927-9e6c-4154-b20d-47adb9997296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Duong vong veasna

unread,
Jun 9, 2014, 9:14:09 PM6/9/14
to rubyonra...@googlegroups.com

And after i have change in code how do i submit in heroku.

veasna

Patrício dos Santos

unread,
Jun 10, 2014, 2:27:35 AM6/10/14
to rubyonra...@googlegroups.com

Do:

git add .
git commit -m 'your message'
git push heroku master

Regards
Ps

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Duong vong veasna

unread,
Jun 10, 2014, 6:01:34 AM6/10/14
to rubyonra...@googlegroups.com
thanks you, sir.
it work for me now, but when i add style css and i restart heroku it not run what i have added.
please help me.
thanks.

veasna.

Walter Lee Davis

unread,
Jun 10, 2014, 8:52:26 AM6/10/14
to rubyonra...@googlegroups.com
Have a google for rake assets:precompile. You will need to trigger that on Heroku, and I don't remember how that happens, or if there's a setting you have to engage to make it automatic.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/61233106-f97c-40af-8450-36cf6b5090e0%40googlegroups.com.

Frederick Cheung

unread,
Jun 10, 2014, 9:31:23 AM6/10/14
to rubyonra...@googlegroups.com


On Tuesday, June 10, 2014 1:52:26 PM UTC+1, Walter Lee Davis wrote:
Have a google for rake assets:precompile. You will need to trigger that on Heroku, and I don't remember how that happens, or if there's a setting you have to engage to make it automatic.


And of course style.css would have to be on the list of assets to precompile.

Fred


Walter

On Jun 10, 2014, at 6:01 AM, Duong vong veasna wrote:

> thanks you, sir.
> it work for me now, but when i add style css and i restart heroku it not run what i have added.
> please help me.
> thanks.
>
> veasna.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages