LINUX.ORG.RU

rails приложение не видит jquery

 , ,


0

1

в определенный момент оно сломалось.. log

Started GET "/" for 127.0.0.1 at 2013-02-02 12:18:37 +0200
Processing by HomeController#index as HTML
  Rendered home/index.html.erb within layouts/application (0.1ms)
  Rendered layouts/_header.html.erb (0.1ms)
  Rendered layouts/_navigation.html.erb (3.0ms)
Completed 500 Internal Server Error in 59ms

ActionView::Template::Error (couldn't find file 'jquery'
  (in /home/vv/work/own/ruby/reard/app/assets/javascripts/application.js:13)):
    30:         </div>
    31:     </div>
    32: 
    33:     <%= javascript_include_tag "application" %>
    34: </body>
    35: </html>
  app/views/layouts/application.html.erb:33:in `_app_views_layouts_application_html_erb___92547131_88237250'


  Rendered /var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
  Rendered /var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
  Rendered /var/lib/gems/1.9.1/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (5.5ms)

application.js

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.                                                                
//                                                                              
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//                                                                              
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.                                                           
//                                                                              
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.                                                 
//                                                                              
//= require jquery                                                              
//= require jquery_ujs                                                          
//= require_tree .                                                              
//= require ../../../vendor/assets/javascripts/bootstrap                        
//= require ../../../vendor/assets/javascripts/jquery.selectboxit               
//= require jquery.ui.all                                                       
                                                                                
function blah() {
 // ... skipped

bundle install

vv@vv-Latitude-E5520 ~/work/own/ruby/reard $ bundle install | grep jquery
Using jquery-rails (2.2.0) 
Using jquery-ui-rails (3.0.1) 
vv@vv-Latitude-E5520 ~/work/own/ruby/reard $ 

где я накосячил?

★★★★★

Ответ на: комментарий от vladimir-vg

покажи Gemfile

можна поинтересоватся зачем?

source 'https://rubygems.org'                                                   
                                                                                
gem 'rails', '~>3.2'                                                            
                                                                                
# Bundle edge Rails instead:                                                    
# gem 'rails', :git => 'git://github.com/rails/rails.git'                       
                                                                                
gem 'mysql2'                                                                    
                                                                                
                                                                                
# Gems used only for assets and not required                                    
# in production environments by default.                                        
group :assets do                                                                
  #gem 'sass-rails',   '~> 3.2.3'                                               
  #gem 'coffee-rails', '~> 3.2.1'                                               
                                                                                
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby                                     
                                                                                
  gem 'uglifier', '>= 1.0.3'                                                    
end                                                                             
                                                                                
gem 'jquery-ui-rails'                                                           
#gem "twitter-bootstrap-rails"                                                  
                                                                                
# To use ActiveModel has_secure_password                                        
# gem 'bcrypt-ruby', '~> 3.0.0'                                                 
                                                                                
# To use Jbuilder templates for JSON                                            
# gem 'jbuilder'                                                                
                                                                                
# Use unicorn as the app server                                                 
# gem 'unicorn'                                                                 
                                                                                
# Deploy with Capistrano                                                        
# gem 'capistrano'                                                              
                                                                                
# To use debugger                                                               
# gem 'debugger'                                                                
ZuBB ★★★★★ ()
Ответ на: комментарий от ZuBB

А добавить

gem 'jquery-rails' 

не пробовал? И само-собой, перезапустить сервер после этого.

drakmail ★★★★ ()
Ответ на: комментарий от ZuBB

Блин, ну ты офигеть вообще. Надо хоть одним глазком документацию читать, всё-таки. Это же совсем наркоманская ошибка, возникшая из-за какого-то вопиющего незнания того, как вообще работают рельсы и бандлер =/

drakmail ★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.