简体   繁体   English

Rails 4.2.3 Active Admin错误

[英]Rails 4.2.3 Active Admin error

Im on Windows 7 running Rails 4.2.3 and I have been trying to install active admin as part of an older tutorial. 我在运行Rails 4.2.3的Windows 7上运行,并且我一直在尝试安装活动管理作为旧教程的一部分。

I updated my Gemfile 我更新了Gemfile

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'


gem 'pg'
gem 'activeadmin', github: 'activeadmin'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails' 

.........etc .........等等

Ran

$bundle install $捆绑安装

then 然后

$rails g active_admin:install --skip-users $ rails g active_admin:install --skip-users

$ rake db:migrate $ rake db:migrate

restarted my server going to localhost:3000/admin throws this error: 重新启动我的服务器进入localhost:3000 / admin会引发此错误:

ExecJS::ProgramError in Admin::Dashboard#index Admin :: Dashboard#index中的ExecJS :: ProgramError

Showing C:/Ruby21-x64/lib/ruby/gems/2.1.0/bundler/gems/activeadmin-3254f53b4b35/app/views/active_admin/page/index.html.arb where line #2 raised: 显示C:/Ruby21-x64/lib/ruby/gems/2.1.0/bundler/gems/activeadmin-3254f53b4b35/app/views/active_admin/page/index.html.arb,其中第2行出现:

TypeError: Object doesn't support this property or method TypeError:对象不支持此属性或方法

// //

I feel like i've followed all the documents on how to install this and have run out of things to read. 我觉得我已经按照有关如何安装它的所有文档进行操作,并且没有足够的内容来阅读。 Is there just some beginner's error here or am I missing something? 这里只是一些初学者的错误还是我错过了什么?

as requested here is the code from the index.html.arb file for the gem which is only one line.... 这里要求的是来自gem的index.html.arb文件中的代码,仅一行。

insert_tag active_admin_application.view_factory["page"]

The stacktrace is irritating, you need to install a Windows compatible javascript interpreter. stacktrace很烦人,您需要安装Windows兼容的javascript解释器。 Take a look on https://github.com/rails/execjs#readme 看看https://github.com/rails/execjs#readme

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM