新手问题 couldn't find file 'jquery-ui

jiwoorico · 2013年09月09日 · 最后由 messiahxu 回复于 2013年09月09日 · 4089 次阅读

在学习 rails 过程中,出现这个错误。下面是我的 javascript 配置文件: //= require jquery //= require jquery-ui //= require jquery_ujs //= require_tree .

出错信息: Sprockets::FileNotFound in Store#index

Showing c:/Sites/depot/app/views/layouts/application.html.erb where line #6 raised:

couldn't find file 'jquery-ui' (in c:/Sites/depot/app/assets/javascripts/application.js:23) Extracted source (around line #6):

3:

4: Pragprog Books Online Store 5: <%= stylesheet_link_tag "application", :media => "all" %> 6: <%= javascript_include_tag "application" %> 7: <%= csrf_meta_tags %> 8: 9:

是不是用了 jquery-ui-rails ?

#1 楼 @messiahxu source 'https://rubygems.org'

gem 'rails', '3.2.6'

Bundle edge Rails instead:

gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

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-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'

下载一个 jquery-ui js 文件放到 javascripts/ 下就可以了

#2 楼 @jiwoorico As of v3.0, jquery-rails no longer includes jQuery UI. Use the jquery-ui-rails gem

需要 登录 后方可回复, 如果你还没有账号请 注册新账号