I've created the engine using
rails plugin new coffee --mountable
I've also created a basic controller in the engine and the dummy app. If
I remove the javascript include tag, everything works. But with the tag
there it just bails since it can't fine jQuery. The jquery-rails gem is
installed. I have jquery as a dependency in my
gemspec file. I've even added an Gemfile to the dummy app just to try,
but it gives the same error.
accessing the dummy app
----------------------------------------------------------
Sprockets::FileNotFound in Root#index
couldn't find file 'jquery'
(in /Webapps/coffee/test/dummy/app/assets/javascripts/application.js:7)
Started GET "/" for 127.0.0.1 at 2011-09-01 20:31:01 +0200
Processing by RootController#index as HTML
Rendered root/index.html.erb within layouts/application (8.9ms)
Completed 500 Internal Server Error in 89ms
ActionView::Template::Error (couldn't find file 'jquery'
(in
/Webapps/coffee/test/dummy/app/assets/javascripts/application.js:7)):
3: <head>
4: <title>Dummy</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
app/views/layouts/application.html.erb:6:in
`_app_views_layouts_application_html_erb___187280571548804820_2155822020'
accessing the engine
----------------------------------------------------------
Sprockets::FileNotFound in Coffee/pages#index
couldn't find file 'jquery'
(in /Webapps/coffee/app/assets/javascripts/coffee/application.js:7)
Started GET "/coffee" for 127.0.0.1 at 2011-09-01 20:49:57 +0200
Processing by Coffee::PagesController#index as HTML
Rendered /Webapps/coffee/app/views/coffee/pages/index.html.erb within
layouts/coffee/application (0.3ms)
Completed 500 Internal Server Error in 41ms
ActionView::Template::Error (couldn't find file 'jquery'
(in
/Users/jorgen/Webapps/coffee/app/assets/javascripts/coffee/application.js:7)):
3: <head>
4: <title>Coffee</title>
5: <%= stylesheet_link_tag "coffee/application" %>
6: <%= javascript_include_tag "coffee/application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
--
Posted via http://www.ruby-forum.com/.
This isn't a solution, but it may be better to simply remove the line
from your js file (Looks like #= require jquery) and use the Google
CDN version:
= javascript_include_tag
'//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', :defer
=> true, :async => true
This will this be faster for your users (because Google has more
cloudspace than you, probably) and it also removes the need for
Sprockets to compress it.
I hope you find out what's going on. :/
Cheers
> --
> 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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Kurtis Rainbolt-Greene:
title: "Hacker, Designer, Author, & Father"
address: "718 Mill Street, Springfield, OR 97477"
phone: "(202) 643-2263"
Thanks for your answer. I was thinking the same thing and I'll just
start developing without javascript all together since I don't need it
in the initial phase.
I've also tried using and creating the engine with Rails 3.1.0rc5 and
3.1.0rc8 and I get the same error. Surely I can't be alone with geting
this error?
I think I'll post an issue on Github.
// This is a manifest file that'll be compiled into including all the
files listed below.
// Add new JavaScript/Coffee code in separate files in this directory
and they'll automatically
// be included in the compiled file accessible from
http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll
appear at the bottom of the
// the compiled file.
//
//= javascript_include_tag
'//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', :defer
=> true, :async => true
//= require jquery_ujs
//= require_tree .