Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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 · 14 comments
@jrgifford

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?

@rafaelfranca
Owner

Could you create an example application reproducing the behavior?

@jiripospisil

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

@rafaelfranca
Owner

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

@guilleiguaran

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

@jrgifford

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

@tenderlove tenderlove was assigned
@codeblooded

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?

@jrgifford

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

@robin850
Collaborator

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

@jrgifford

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

@jrgifford

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

@rosstimson

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.

@steveklabnik
Collaborator

Seems good.

@jrgifford

confirmed again. so it looks good. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.