0

当我开始运行我的 Rails 服务器时,当我转到 localhost:3000 时,我收到此文件未找到错误。我收到的信息是couldn't find file 'jquery.effects.core'。从我的 repo 中提取应用程序的新克隆到重新安装 Rails 和 Ruby,我几乎已经做了所有我能做的事情,但这一切都导致了同样的错误。有任何想法吗?

当我运行我的 rails 服务器时,我得到以下输出:

sudo rails s
=> Booting Thin
=> Rails 3.2.9 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
        SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
        This poses a security threat. It is strongly recommended that you
        provide a secret to prevent exploits that may be possible from crafted
        cookies. This will not be supported in future versions of Rack, and
        future versions will even invalidate your existing user cookies.

        Called from: /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/gems/actionpack-3.2.9/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.

>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

这是我的 Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.9'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'
gem 'rails_admin'
gem 'devise'
gem 'cancan'
gem 'simple_form'
gem 'kaminari'
gem 'bootstrap-kaminari-views'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'acts_as_commentable_with_threading'

# 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'
  gem 'uglifier', '>= 1.0.3'
end

group :production do
  gem 'thin'
end

gem 'libv8', '~> 3.11.8'
gem "therubyracer", '>= 0.11.0beta8', :require => 'v8'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem "less-rails"

gem 'paperclip'
gem 'aws-sdk'

gem 'jquery-rails'

编辑(已解决):这是我的 application.js 文件。当我取消注释该行时,一切似乎都有效= require jquery。我不知道如何解释这一点,因为即使该行已被注释掉,也有其他人在使用同一组源代码时不会遇到此问题。

// 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 twitter/bootstrap
//= require_tree .
4

1 回答 1

1

看起来这是 RailsAdmin gem 中的一个错误:

https://github.com/sferik/rails_admin/issues/1471

运行“捆绑更新”为我解决了这个问题。

于 2013-01-14T14:43:02.580 回答