1

Showing "/Users/Christian/Desktop/sample_app/app/views/layouts/application.html.erb" where line #5 raised:

No such file or directory - /Users/Christian/Desktop/vendor/assets (in /Users/Christian/Desktop/sample_app/app/assets/stylesheets/custom.css.scss)

<html>
    <head>
        <title><%= full_title(yield(:title)) %></title>
        <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
        <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
        <%= csrf_meta_tags %>
        <%= render 'layouts/shim' %>`

I was developing on linux ubuntu and it works fine there, I copied the folder to my mac and it no longer works. custom.css.scss is in the correct location

The problem is on line number 5 :

<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>`
skrrgwasme
  • 9,358
  • 11
  • 54
  • 84
Brando
  • 23
  • 2
  • 6
  • Can you show your application.css file? – Michał Młoźniak Aug 29 '14 at 18:27
  • Probably some css declared in application.css is missing. – Juanito Fatas Aug 29 '14 at 18:28
  • Here is the application.css `/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . */` – Brando Aug 29 '14 at 18:28
  • Is your vendor directory really under Desktop or is it missing the "sample_app"? – Mika Aug 29 '14 at 18:31
  • Mika, my vendor directory is inside sample_app. – Brando Aug 29 '14 at 18:35
  • Well, then it is no wonder it is telling you "No such file or directory - /Users/Christian/Desktop/vendor/assets". How does your custom.css.scss file look like? – Mika Aug 29 '14 at 18:40
  • I have no idea why it thinks it's in the desktop and how to make it look at the right place. He is my custom.css.scss [link](http://cl.ly/code/1M381K1i2s2D) – Brando Aug 29 '14 at 18:44
  • I don't know what could cause that but have you seen this question http://stackoverflow.com/questions/12611298/bootstrap-file-to-import-not-found-or-unreadable it seems to have something in common. – Mika Aug 29 '14 at 19:17

2 Answers2

5

Change sass-rails version to 4.0.3 and leave the rest as it is. Remove Gemfile.lock when necessary, and then:

$ bundle update
$ bundle install

Finally, don't forget to restart your rails server!

chr151ux
  • 66
  • 2
2

In your Gemfile change the sass-rails version to 4.0.3. Get rid of a version number for sprockets. Delete the Gemfile.lock. Run the bundle install again

chhhavi
  • 23
  • 1
  • 3