Ruby on rails Active Admin-Ruby on Rails的类型错误
我是RubyonRails(4.1.8)的新手,使用Windows8操作系统,我在gemfile中添加了GemActiveAdmin并运行了命令Ruby on rails Active Admin-Ruby on Rails的类型错误,ruby-on-rails,ruby,ruby-on-rails-4,coffeescript,Ruby On Rails,Ruby,Ruby On Rails 4,Coffeescript,我是RubyonRails(4.1.8)的新手,使用Windows8操作系统,我在gemfile中添加了GemActiveAdmin并运行了命令 rails g active_admin:install --skip-users rake db:migrate rails server 但我在运行时遇到以下异常 TypeError:对象不支持此属性或方法(在 c:/Sites/CleverChalk/app/assets/javascripts/active_admin.js.coffee)
rails g active_admin:install --skip-users
rake db:migrate
rails server
但我在运行时遇到以下异常
TypeError:对象不支持此属性或方法(在
c:/Sites/CleverChalk/app/assets/javascripts/active_admin.js.coffee)
有人能告诉我为什么会这样吗。我在网上读了几篇文章
咖啡脚本源代码
和
coffee rails
但它们对我不起作用
我的档案如下:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'activeadmin', github: 'activeadmin'
gem 'coffee-script-source', '1.8.0'
gem 'coffee-rails', '~> 4.0.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
我可以通过向用户重新安装activeadmin来解决此问题,这意味着添加Desive gem,如下所示:
gem 'devise'
到gemfile,然后
bundle install
rails generate devise:install
谢谢。看看这篇文章的答案是否对你有帮助:你使用的是什么版本的
咖啡脚本?你能显示你的gem文件吗?
?我将其更新为-->gem“咖啡脚本源代码”,“1.8.0”编辑了这个问题。。它现在包含gemfile,在您更新到'coffee-script-source','1.8.0'
后它能工作吗?