Rails 3.2.8 Application.js and Application.css are not working as expcted

后端 未结 4 1269
野性不改
野性不改 2020-12-31 11:04

When i try to include

<%= stylesheet_link_tag    \"application\" %>
<%= javascript_include_tag \"application\" %>

The content

4条回答
  •  佛祖请我去吃肉
    2020-12-31 11:51

    Nazar Hussain's answer helped me. It depends on ruby version too. If you are using v.2 then try to downgrade to v.1.9. It is very easy if you are using rvm:

    To install v.1.9.3 use:

    $ rvm install 1.9.3
    

    To use v.1.9.3 as default:

    $ rvm --default use 1.9.3
    

    Then

    • restart your terminal
    • install bundler gem
    • run bundle install
    • run rake assets:clean RAILS_ENV=development
    • start your server rails s

    That's all.

提交回复
热议问题