Hi Everyone,
I was trying out some sample applications for Rails. I created some
controllers and pages. But when i try to access one of them i get an
exception on the webpage:
---------------------------------------------------------------------
Sprockets::FileNotFound in Pages#home
Showing c:/railscode/test_app/app/views/layouts/application.html.erb
where line #6 raised:
couldn''t find file ''jquery''
(in c:/railscode/test_app/app/assets/javascripts/application.js:7)
Extracted source (around line #6):
3: <head>
4: <title>TestApp</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
Rails.root: c:/railscode/test_app
------------------------------------------------------------------------
I created some controllers using the command:
$ rails generate controller Pages home contact
create app/controllers/pages_controller.rb
route get "pages/contact"
route get "pages/home"
invoke erb
create app/views/pages
create app/views/pages/home.html.erb
create app/views/pages/contact.html.erb
invoke rspec
create spec/controllers/pages_controller_spec.rb
create spec/views/pages
create spec/views/pages/home.html.erb_spec.rb
create spec/views/pages/contact.html.erb_spec.rb
invoke helper
create app/helpers/pages_helper.rb
invoke rspec
create spec/helpers/pages_helper_spec.rb
invoke assets
invoke js
create app/assets/javascripts/pages.js
invoke css
create app/assets/stylesheets/pages.css
Just wanted to know where the problem could be and where to look? I am
accessing the page by the URL: http://localhost:3000/pages/home
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
It is because of Jquery file not founded error If you are using rails 3.1.X then in app/assets/javascripts/application.js remove lines //= require jquery //= require jquery_ujs otherwise if u want to use jquery just copy jquery.js and jqueryui.js in app/assets/javascripts/ On Friday 25 November 2011 04:15 PM, Somnath Mallick wrote:> Hi Everyone, > > I was trying out some sample applications for Rails. I created some > controllers and pages. But when i try to access one of them i get an > exception on the webpage: > > --------------------------------------------------------------------- > Sprockets::FileNotFound in Pages#home > Showing c:/railscode/test_app/app/views/layouts/application.html.erb > where line #6 raised: > > couldn''t find file ''jquery'' > (in c:/railscode/test_app/app/assets/javascripts/application.js:7) > Extracted source (around line #6): > > 3:<head> > 4:<title>TestApp</title> > 5:<%= stylesheet_link_tag "application" %> > 6:<%= javascript_include_tag "application" %> > 7:<%= csrf_meta_tags %> > 8:</head> > 9:<body> > > > Rails.root: c:/railscode/test_app > > ------------------------------------------------------------------------ > > I created some controllers using the command: > > > $ rails generate controller Pages home contact > create app/controllers/pages_controller.rb > route get "pages/contact" > route get "pages/home" > invoke erb > create app/views/pages > create app/views/pages/home.html.erb > create app/views/pages/contact.html.erb > invoke rspec > create spec/controllers/pages_controller_spec.rb > create spec/views/pages > create spec/views/pages/home.html.erb_spec.rb > create spec/views/pages/contact.html.erb_spec.rb > invoke helper > create app/helpers/pages_helper.rb > invoke rspec > create spec/helpers/pages_helper_spec.rb > invoke assets > invoke js > create app/assets/javascripts/pages.js > invoke css > create app/assets/stylesheets/pages.css > > Just wanted to know where the problem could be and where to look? I am > accessing the page by the URL: http://localhost:3000/pages/home >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for the reply. I am using 3.1.3. And from where do i get those file? Does the additions need a restart of the WebRick server? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Oh well.... Copied them from the C:\Ruby193\gems\jquery-rails-1.0.18\vendor\assets\javascripts folder and it worked! Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
just download from googling. no need of restarting server just reload browser On Friday 25 November 2011 05:27 PM, Somnath Mallick wrote:> Thanks for the reply. I am using 3.1.3. And from where do i get those > file? Does the additions need a restart of the WebRick server? >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.