When i open the server ‘rails s’ & then refresh the browser, I get the following error.
Started GET "/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" for 127.0.0.1 at 2011-11-27 16:38:06 -0800
ActionController::RoutingError (No route matches [GET] "/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css"):
I have one single controller & an index action. So obviously the error is coming from there. Here is the sample code from that view.
<head>
<meta charset="UTF-8">
<title>Video Gallery</title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<link rel="stylesheet" type="text/css" href="video_gallery.css" />
<link rel="stylesheet" type="text/css" href="jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="includes/jquery-1.6.1.min.js"></script>
Here is the error -> <script type="text/javascript" src="jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.js"></script>
I know the error is coming coz the path to the file is incorrect.
How can i make the rails console tell me:-
1). From What line number in which particular controller/ View this error is generated?
Any gems for this?
When you install latest ruby with rvm , debugger automatically gets installed. In addition you can add gem to your gemfile # gem ‘ruby-debug19’, :require => ‘ruby-debug’. — But i still can’t run this command rails server –debugger , it gives me error, Also i need the console to point to the particular line in my code from where the error is coming.
Setting consider_all_requests_local to true causes Rails to display those developerfriendly error screens even when the machine making the request is remote. config.consider_all_requests_local = true – user917158 Nov 28 at 1:49
Use the rails s screen for debugging purposes.