Ruby on Rails Wednesday, January 2, 2019

Steps to reproduce

  1. Create Rails 6 app
  2. yarn add onsenui
  3. Add below lines to "app/assets/stylesheets/application.css"
     *= require onsenui/css/onsenui       *= require onsenui/css/onsen-css-components  
  1. Create a sample view as below
<ons-page>    <div style="text-align: center; margin-top: 30px;">      <p>        <ons-input id="username" modifier="underbar" placeholder="Username" float></ons-input>      </p>      <p>        <ons-input id="password" modifier="underbar" type="password" placeholder="Password" float></ons-input>      </p>      <p style="margin-top: 30px;">        <ons-button onclick="login()">Sign in</ons-button>      </p>    </div>  </ons-page>  
  1. Access that page

Expected behavior

Page should render without error.

Actual behavior

$ rails s
=> Booting Puma
=> Rails 6.0.0.alpha application starting in development
=> Run rails server --help for more startup options
Puma starting in single mode...

  • Version 3.12.0 (ruby 2.5.3-p105), codename: Llamas in Pajamas
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://0.0.0.0:3000
    Use Ctrl-C to stop
    Started GET "/pages/auth" for 127.0.0.1 at 2019-01-02 12:17:55 +0530
    (5.7ms) SELECT sqlite_version(*)
    Processing by PagesController#auth as HTML
    Rendering pages/auth.html.erb within layouts/application
    Rendered pages/auth.html.erb within layouts/application (Duration: 2.9ms | Allocations: 350)
    Completed 500 Internal Server Error in 377ms (ActiveRecord: 0.0ms | Allocations: 287951)

ActionView::Template::Error (couldn't find file 'onsenui/css/onsenui' with type 'text/css'
Checked in these paths:
/home/smitha/Documents/kiran/fooapp/app/assets/config
/home/smitha/Documents/kiran/fooapp/app/assets/images
/home/smitha/Documents/kiran/fooapp/app/assets/stylesheets
/home/smitha/Documents/kiran/rails/actioncable/app/assets/javascripts
/home/smitha/Documents/kiran/rails/activestorage/app/assets/javascripts
/home/smitha/Documents/kiran/rails/actionview/app/assets/javascripts
/home/smitha/.rvm/gems/ruby-2.5.3/gems/turbolinks-source-5.2.0/lib/assets/javascripts):
5: <%= csrf_meta_tags %>
6: <%= csp_meta_tag %>
7:
8: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
9: <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
10:
11:

app/assets/stylesheets/application.css:14
app/views/layouts/application.html.erb:8

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38cb0ca0-ce2b-4795-99ba-4706355fd6c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment