Rails 6 alpha: Sprockets::FileNotFound
Rails Alpha 6 is having issue with detecting the stylesheets. For which I have provided below steps to reproduce.
Steps to reproduce
1) Create Rails 6 app
2) yarn add onsenui
Add below lines to "app/assets/stylesheets/application.css"
*= require onsenui/css/onsenui
*= require onsenui/css/onsen-css-components
3) Create a sample view as below
Sign in
4) 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
ruby-on-rails sprockets ruby-on-rails-6
add a comment |
Rails Alpha 6 is having issue with detecting the stylesheets. For which I have provided below steps to reproduce.
Steps to reproduce
1) Create Rails 6 app
2) yarn add onsenui
Add below lines to "app/assets/stylesheets/application.css"
*= require onsenui/css/onsenui
*= require onsenui/css/onsen-css-components
3) Create a sample view as below
Sign in
4) 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
ruby-on-rails sprockets ruby-on-rails-6
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11
add a comment |
Rails Alpha 6 is having issue with detecting the stylesheets. For which I have provided below steps to reproduce.
Steps to reproduce
1) Create Rails 6 app
2) yarn add onsenui
Add below lines to "app/assets/stylesheets/application.css"
*= require onsenui/css/onsenui
*= require onsenui/css/onsen-css-components
3) Create a sample view as below
Sign in
4) 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
ruby-on-rails sprockets ruby-on-rails-6
Rails Alpha 6 is having issue with detecting the stylesheets. For which I have provided below steps to reproduce.
Steps to reproduce
1) Create Rails 6 app
2) yarn add onsenui
Add below lines to "app/assets/stylesheets/application.css"
*= require onsenui/css/onsenui
*= require onsenui/css/onsen-css-components
3) Create a sample view as below
Sign in
4) 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
ruby-on-rails sprockets ruby-on-rails-6
ruby-on-rails sprockets ruby-on-rails-6
edited Jan 17 at 15:27
Javier Menéndez Rizo
1,2211616
1,2211616
asked Jan 2 at 8:41
Kiran PatilKiran Patil
101110
101110
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11
add a comment |
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54003391%2frails-6-alpha-sprocketsfilenotfound%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54003391%2frails-6-alpha-sprocketsfilenotfound%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Resolved the issue by adding "Rails.application.config.assets.paths << Rails.root.join('node_modules')" to config/initializers/assets.rb.
– Kiran Patil
Jan 2 at 15:11