Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Front-End Framework" chapter derailment #49

Closed
tdkehoe opened this issue Mar 3, 2015 · 4 comments
Closed

"Front-End Framework" chapter derailment #49

tdkehoe opened this issue Mar 3, 2015 · 4 comments

Comments

@tdkehoe
Copy link

tdkehoe commented Mar 3, 2015

My app looked fine in the browser at the end of the chapter "Layouts and Views." In the chapter "Front-End Framework" I ran:

$ rails generate layout:install foundation5 --force

I see the file

app/assets/stylesheets/framework_and_overrides.css.scss

and I don't see the file

app/assets/stylesheets/simple.css

So I know that the "install foundation5" ran.

In the browser window I see an error screen with two errors (attached).

In the terminal I see this error message, followed by lots of lines starting with "sass":

Sass::SyntaxError - Invalid CSS after "...ules: $modules ": expected "}", was "!global;"

In looking at the terminal, I see that "install foundation5" removed two files not mentioned in the book:

app/assets/stylesheets/application.css
app/assets/stylesheets/bootstrap_and_overrides.css.scss

I also found that after using "git reset --hard" one new file remained:

app/assets/stylesheets/framework_and_overrides.css.scss

With this file I get the error messages. When I delete this file my old webpage comes back.

Any suggestions?
screen shot 2015-03-02 at 5 13 03 pm
screen shot 2015-03-02 at 5 13 14 pm

@DanielKehoe
Copy link
Member

Try running $ bundle update in your terminal application. It's possible that the foundation-rails gem needs to be updated (the newest version is 5.5.1.0). In the past, errors with "invalid CSS... !global" have been related to Foundation and Sass issues.

@tdkehoe
Copy link
Author

tdkehoe commented Mar 5, 2015

$bundle update

says that I have foundation-rails 5.5.0.0 but it didn't update to 5.5.1.0. My Gemfile doesn't have a version lock on foundation-rails. I tried running

$ bundle update foundation-rails

but it didn't update to 5.5.1.0.

@DanielKehoe
Copy link
Member

Try removing the file Gemfile.lock and running $ bundle install.

@DanielKehoe
Copy link
Member

The Gemfile listing in versions of the book prior to version 2.1.6 showed gem 'sass-rails', '~> 4.0.1' where it should have been gem 'sass-rails', '~> 5.0'. I've corrected the error in version 2.1.6 of the book.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants