I restart my project after one month and get this error
Showing /home/abc/prij/app/views/layouts/application.html.erb where line #5 raised:
Invalid CSS after "...���������������": expected "{", was ""
ActionView::Template::Error (Invalid CSS after "...���������������": expected "{", was ""):
2: <html>
3: <head>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
6: <%= csrf_meta_tags %>
7: </head>
How I resolve this?
Something's very wrong with one of your asset files. Are you sure you're not including a non-css file in your application.css.scss?
I'd narrow it down by removing some of your requires from application.css.scss. Hopefully this will isolate the problematic code, but it's tough to say much without more information.
Related
I'm following this answer about using yarn to set up semantic-ui with rails but get this vague error that says only Unrecognised input whenever I access localhost. The stack trace is short and the only clue it provides is to the stylesheet and javascript link tags in my application.html.erb head:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
What does Unrecognised input mean, and what causes it?
who would win? many lines of code or one missing semicolon?
make sure you end your variable declarations with a semicolon.
I am having this error. I have already installed nodejs and also added gem'therubyracer'.
ActionView::Template::Error (SyntaxError: [stdin]:21:3: unexpected ():
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3921329476922966565_70164612108380'
However, after I add this block of code in my rooms.coffee file, I get the error:
$('#new_message').submit(e) ->
$this = $(this)
textarea = $this.find('#message_body')
if $.trim(textarea.val()).length > 1
App.global_chat.send_message textarea.val(),
messages.data('chat-room-id')
textarea.val('')
e.preventDefault()
return false
I am currently using Linux mint.
I recently cloned my Rails app, which was developed on Linux, to my Windows OS. There were a few errors, and I managed to fix most of them except this one. This error pops up when I try to access my page locally:
JSON::ParserError
419: unexpected token at ''
This is the code in question:
<head>
<title>DemoApp</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= javascript_include_tag "ckeditor/ckeditor.js" %>
<%= csrf_meta_tags %>
I researched and couldn't find a straightforward solution to this. I had previously changed my runtimes.rb to 'UTF-8' so that it will run in Windows.
Any help is much appreciated.
It could be because of a BOM or a tabulation space, it happens to me when I try to paste inside Vim.
I'm using rails 5 to create a Facebook clone as a project and I periodically get an 'Errno::ENOENT in Devise::Sessions#new' error sometimes when I start the local server. I haven't yet experienced the problem on my production server. The problem goes away once I refresh the page.
The extracted source code is below. The line that starts stylesheet_link_tag is highlighted.
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
No such file or directory # rb_file_s_rename - path/facebook/tmp/cache/assets/sprockets/v3.0/Ej/EjoE1YdPTMb8n3_nucZiHWaR9FpoOSZttfl56_miOS0.cache.47161664401480.4109.232718, path/facebook/tmp/cache/assets/sprockets/v3.0/Ej/EjoE1YdPTMb8n3_nucZiHWaR9FpoOSZttfl56_miOS0.cache)
Showing C:/Users/Jacob Zabner/Desktop/My ror/blog/app/views/layouts/application.html.erb where line #7 raised:
TypeError: Object doesn't support this property or method
Extracted source (around line #7):
5
6
7
8
9
10
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
I just figured it out: I needed to change the first parameter in lines 7 and 8 of the file /app/views/layouts/application.html.erb from application to default.