Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

When creating a new item in rails 4 that was generated by scaffold, by default it doesn't have any CSS. #8684

Closed
jrgifford opened this Issue Jan 2, 2013 · 14 comments

Comments

Projects
None yet
9 participants
Contributor

jrgifford commented Jan 2, 2013

Not sure what is going on here.

as of 56aa02f, on Ubuntu 12.10 with ruby 1.9.3p362, the following happens:

generate a new rails application, and then generate a resource - I used rails g scaffold article title:string body:text.

Migrate the database and start the server, then head to localhost:3000/articles/new, and create a new article, and then click "Create Article".

In Firefox, what happens next is rather interesting. On the page with the flash message, it shows this:

Screenshot from 2013-01-01 22:28:40

Firebug reports that it has no style rules. I then opened it up in a new tab, and it shows this:

Screenshot from 2013-01-01 22:29:27

Firebug reports that it has these style rules:

body {
    background-color: #FFFFFF;
    color: #333333;
    font-family: verdana,arial,helvetica,sans-serif;
    font-size: 13px;
    line-height: 18px;
}

In Chrome, the opposite happens. The one with the flash shows the style rules, the one without shows none.

What is going on here?

Owner

rafaelfranca commented Jan 2, 2013

Could you create an example application reproducing the behavior?

Contributor

jiripospisil commented Jan 2, 2013

I can reproduce it. I get this in the console when refreshing the page: https://gist.github.com/4434883

Owner

rafaelfranca commented Jan 2, 2013

OMG! This seems very bad. I'll take a look later

Owner

guilleiguaran commented Jan 2, 2013

@jrgifford can you give a try with any other web server (thin, unicorn, puma...)?

Contributor

jrgifford commented Jan 2, 2013

@guilleiguaran Issue is not appearing with thin or puma. Appears to be a WEBrick issue then?

@ghost ghost assigned tenderlove Jan 2, 2013

I was not able to clone the issue in my version of Chrome (23.0.1271.101), WEBrick (1.3.1), and Ruby (1.9.3p362). I received what appears to be the appropriate output with and without the flash message. Although, the log does appear to be similar: https://gist.github.com/4436519. What version of Firefox/Chrome/WEBrick are you using?

Contributor

jrgifford commented Jan 2, 2013

Firefox: 17.0.1
Chrome: 25.0.1364.5 (Official Build 174090) dev
Chromium: 26.0.1374.0 (Developer Build 174786)

Ruby (1.9.3p362)
WEBRick: 1.3.1

Member

robin850 commented Jan 3, 2013

I have the same issue with a fresh rails 4 application. I use Chrome 23, ruby 1.9.3p327 and WEBrick 1.3.1.

Contributor

jrgifford commented Jan 4, 2013

As of 59e0c26 , this issue is resolved for me in Firefox, Chromium and Chrome. Can someone pin down what commit fixed it?

Contributor

jrgifford commented Jan 4, 2013

Or rather, can someone verify that it's fixed first?

I can confirm that this is indeed fixed (not sure what commit though) - I tested on a couple of machines and over a range of browsers.

Member

steveklabnik commented Jan 14, 2013

Seems good.

Contributor

jrgifford commented Jan 14, 2013

confirmed again. so it looks good. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment