"g controller" is creating .css not .css.scss

10 views
Skip to first unread message

E. Allan Montes D.

unread,
Jan 16, 2015, 1:51:18 AM1/16/15
to rubyonra...@googlegroups.com

I am using "rails g controller welcome index" to generate the files for a new app, but it generates welcome.scss (instead of welcome.css.scss). Terefoe I am unable to link the css code to the main page. Any suggestions?

Vivek Sampara

unread,
Jan 16, 2015, 2:13:11 AM1/16/15
to rubyonra...@googlegroups.com
I think you're missing the gem 'sass-rails' . can you paste your Gemfile ? 

On Fri, Jan 16, 2015 at 12:21 PM, E. Allan Montes D. <allan....@gmail.com> wrote:

I am using "rails g controller welcome index" to generate the files for a new app, but it generates welcome.scss (instead of welcome.css.scss). Terefoe I am unable to link the css code to the main page. Any suggestions?

--
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/955869c0-46a9-47e5-9fc1-eafcff516238%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frederick Cheung

unread,
Jan 16, 2015, 3:40:53 AM1/16/15
to rubyonra...@googlegroups.com
On Friday, January 16, 2015 at 6:51:18 AM UTC, E. Allan Montes D. wrote:
> I am using "rails g controller welcome index" to generate the files for a new app, but it generates welcome.scss (instead of welcome.css.scss). Terefoe I am unable to link the css code to the main page. Any suggestions?

This is normal in the latest version of sass-rails (included in rails 4-2). See this commit for example: https://github.com/rails/sass-rails/commit/f298f4da0d6bb7c6ff24ceaf893e3d5f644a73eb

You shouldn't be linking to individual scss files anyway (they won't load in production). Instead @import them into a manifest (e.g. application.css) and link to that instead.

Fred
Reply all
Reply to author
Forward
0 new messages