hie
I tried to include #import "bootstrap"; in a file in stylesheets with name custom.css.scss
now on running the app i get the error as:
Started GET "/static_pages/about" for 127.0.0.1 at 2012-07-24 13:23:20 -0700
Processing by StaticPagesController#about as HTML
Rendered static_pages/about.html.erb within layouts/application (0.0ms)
Completed 500 Internal Server Error in 44ms
ActionView::Template::Error (different prefix: "C:/" and "D:/Rails/sample_app/ap
p/assets/stylesheets"
(in D:/Rails/sample_app/app/assets/stylesheets/custom.css.scss)):
2: <html>
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_ht
ml_erb___106293522_33950052'
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6
/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.0ms)
Please advise how to fix it.
whatever you mean by the stuff that you are writing in your title, but i think that this problem is with your WIN setup: https://github.com/rails/rails/issues/660
I moved my application to the C:\ drive, where Rails is installed, to fix the issue.
Related
I recently installed rails 5.1.6 but when I go to any one of the views in an application, it throws the following error.
Errno::ENOENT in Test#index
No such file or directory # unlink_internal - C:/Users/Bastian/AppData/Local/Temp/execjs20180513-17244-1f5fvjjson
Started GET "/test/index" for 127.0.0.1 at 2018-05-13 20:22:07 -0400
Processing by TestController#index as HTML
Rendering test/index.html.erb within layouts/application
Rendered test/index.html.erb within layouts/application (1.0ms)
Access Denied.
Completed 500 Internal Server Error in 427ms
ActionView::Template::Error (No such file or directory # unlink_internal - C:/Users/Bastian/AppData/Local/Temp/execjs20180513-17244-1f5fvjjson):
4: <title>Testr</title>
5: <%= csrf_meta_tags %>
6:
7: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9: </head>
10:
app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb__530887143_69788540'
I've been looking everywhere but haven't found a solution.
I hope somebody can help me.
Well, finally I figured out how to get rid of the error thanks to this answer in https://stackoverflow.com/a/17748774/8048737
In resume I deleted these two lines from application.js:
//= require turbolinks
//= require_tree .
I'm starting to develop in RoR and I have found the following problem:
Message
The command prompt:
Started GET "/pages/inicio" for 127.0.0.1 at 2017-06-22 22:43:24 -0300
Processing by PagesController#inicio as HTML
Rendering pages/inicio.html.erb within layouts/application
Rendered pages/inicio.html.erb within layouts/application (0.5ms)
Completed 500 Internal Server Error in 844ms
ActionView::Template::Error ():
4: <title>Pmo</title>
5: <%= csrf_meta_tags %>
6:
7: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9: </head>
10:
(execjs):1
app/views/layouts/application.html.erb:7:in app_views_layouts_application_html_erb__652431424_78968160'
The application.html.erb file is this.
The controller was generated in the following way:
rails g controller Pages inicio
Environment:
Windows 10
Nodejs v8.1.2
Rails v5.1.1
Ruby v2.3.3
Thanks in advance.
per your error message, it looks like stylesheet problem (line 7) from your application layout, please check your stylesheets /app/assets/stylesheets/ make user your settings in application.css is correct
Each time I launch a rails application, the server displays an error message. For instance (this is from the command line):
Started GET "/" for 127.0.0.1 at 2016-01-10 00:12:31 -0600
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/application (3.0ms)
Completed 500 Internal Server Error in 2054ms
ActionView::Template::Error (TypeError: Object doesn't support this property or method
(in c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)):
3: <head>
4: <title>AlphaBlog</title>
5: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6: <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___602047428_59662224'
Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms)
Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
Rendered c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (64.8ms)
How do I fix this issue?
The first way to solve. Add to file application.js this line:
//= require turbolinks
The second method of solving. In Gemfile set version 1.8.0 for gem 'coffee-script-source' :
gem 'coffee-script-source', '1.8.0'
Try removing the javascript_include_tag (line indicated as broken) and see if the page loads. If the page does load, then it maybe something wrong with the assets files regarding javascript.
Folks,
Trying to learn ruby on rails... following the tutorial, and after doing the foll
rails generate controller Pages home contact
Following shows up in the log/production
Started GET "/pages/home" for 24.18.129.38 at 2013-01-20 10:32:17 +0000
Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (0.0ms)
Completed 500 Internal Server Error in 2ms
ActionView::Template::Error (application.css isn't precompiled):
2: <html>
3: <head>
4: <title>FirstApp</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___2607526346352188026_23275800'
Started GET "/pages/contact" for 24.18.129.38 at 2013-01-20 10:32:21 +0000
Processing by PagesController#contact as HTML
Rendered pages/contact.html.erb within layouts/application (0.3ms)
Completed 500 Internal Server Error in 3ms
ActionView::Template::Error (application.css isn't precompiled):
2: <html>
3: <head>
4: <title>FirstApp</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___2607526346352188026_23275800'
# config/environments/production.rb
...
config.assets.compile = true
...
When I run my little app on my local system everything works fine. When I move to production I get the error 500 message (We're sorry, but something went wrong.). My production.log fiel is showing this:
Started GET "/" for 79.203.113.136 at 2012-11-13 13:54:06 +0100
Processing by DayviewController#index as HTML
Rendered dayview/index.html.erb within layouts/application (0.4ms)
Completed 500 Internal Server Error in 1783ms
ActionView::Template::Error (TypeError: Cannot call method 'write' of undefined
at /tmp/execjs20121113-27948-1cczq8s.js:5043:20
at /tmp/execjs20121113-27948-1cczq8s.js:5057:16
at /tmp/execjs20121113-27948-1cczq8s.js:1:92
at Object.<anonymous> (/tmp/execjs20121113-27948-1cczq8s.js:1:109)
at Module._loadContent (node.js:667:21)
at node.js:695:20
at node.js:304:23
at node.js:756:9
(in /home/www/pvdaheim/app/assets/javascripts/jquery-1.8.2.min.js)):
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= javascript_include_tag :defaults %>
8: <%= javascript_include_tag "jquery-1.8.2.min", "jquery-ui-1.8.23.custom.min", "jquery.ui.datepicker", "rails", "highcharts", "highstock" %>
9: <%= csrf_meta_tags %>
10: </head>
11: <body>
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___1022895261_93021610'
I don't have a file called /tmp/execjs20121113-27948-1cczq8s.js. I found some similar issues in the forum but none of them was helpful for me to fix mine.
Thanks & Regards, Andreas
Here is my index.html.erb:
<div id="container2" style="height:500px; background-color:#999999; border:thin solid">
</div>
<script type="text/javascript" src="./pv_andreas/wr.js"></script>?
<script type='text/javascript'>//<![CDATA[
$(function() {
var chart = new Highcharts.StockChart({
... highstock stuff rendered to container2...
});
//]]>
</script>
And here is my routes.rb:
Pvdaheim::Application.routes.draw do
get "dayview/index"
root :to => 'dayview#index'
end
Remove get "dayview/index" in your routes file and it will work.