0

I added "jquery_mobile_rails" to my Gemfile and did bundle install. Then I added the following lines to my application.css.scss file:

//=require jquery.mobile

However when I run 'bundle exec rails s' and start my app I get this error:

couldn't find file 'jquery.mobile'
  (in /Users/Me/Development/ruby/myapp/app/assets/stylesheets/application.css.scss:1)

I loaded the Rails app console and looked at the assets path config:

 Rails.application.config.assets.paths

I get an array of paths which includes my Gemfile path with the jquery_mobile_rails gem and inside the vendor/assets/javascript I see the file jquery.mobile.js.

So why can't I include this in my application.css.scss?

1 Answer 1

1

You have mistakenly added the line for javascript(application.js) in the application.css . Please add the following line to your application.css.scss

*= require jquery.mobile
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, my syntax could also be used for compiled scss files (which I have since switched to)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.