使用activeadmin进入gem文件。 bundle install
,rails g active_admin:install User
,然后是rails s
,服务器将崩溃并给出警告。
错误信息:
rails s
WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.8.0 => Booting WEBrick => Rails 5.0.0 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x0055902480b218@/home/guo/.rvm/gems/ruby-2.3.1/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/sprockets.rb:25>. Please update your processor interface: https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors (called from install at /home/guo/.rvm/gems/ruby-2.3.1/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/sprockets.rb:25) Exiting
这是我的宝石清单。
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.15'
# 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'
# 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
gem 'activeadmin'
gem 'devise'
gem 'cancancan'
gem 'rolify'
gem 'draper'
gem 'pundit'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'bootstrap-sass', '~>3.3.7'
gem 'autoprefixer-rails', '~>5.2.1'
#gem "twitter-bootstrap-rails"
gem 'carrierwave', '>= 1.0.0.beta', '< 2.0' gem 'rmagick'
gem 'grape'
gem 'doorkeeper'
gem "rack-oauth2"
#gem 'will_paginate', '~> 3.1.1' gem 'kaminari'
gem 'dalli' gem 'actionpack-page_caching' gem 'actionpack-action_caching'
gem 'delayed_job' gem 'delayed_job_active_record' #gem "sidekiq"
#gem "devise-doorkeeper"
gem 'roadie'
gem 'roadie-rails'
gem 'nokogiri', '1.6.0'
#gem 'premailer-rails'
答案 0 :(得分:0)
如果您正在使用滑轨5,请尝试以下操作:
gem 'inherited_resources', git: 'https://github.com/activeadmin/inherited_resources'
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin'
并按照@ray的建议杀死现有服务器,然后启动服务器。您可以检查现有服务器
ps aux|grep puma
它打印出所有这样的彪马过程
pragya_+ 1378 0.2 1.6 1233236 140252 tty4 Sl 10:15 0:24 puma 3.12.1 (tcp://localhost:3000)
1378是process_id。现在,通过运行以下命令终止该进程:
kill -9 1378
重新启动服务器,然后再次检查。希望它能工作:)