狂欢安装错误:“rails g spree:install –user_class = Spree :: User”没有做任何事情

我使用此命令创建了一个新的rails应用程序:

rails new store 

rails版本是:4.2.6

Ruby版本:

 $rvm rubies ruby-2.1.2 [ x86_64 ] ruby-2.2.0 [ x86_64 ] =* ruby-2.2.2 [ x86_64 ]` 

以下是Gemfile:

  source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 4.2.6' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use Puma as the app server gem 'puma', '~> 3.0' # 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.2' # 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 navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 3.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platform: :mri end group :development do # Access an IRB console on exception pages or by using  anywhere in the code. gem 'web-console' gem 'listen', '~> 3.0.5' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end gem 'spree', '~> 3.1.0' gem 'spree_auth_devise', '~> 3.1.0' gem 'spree_gateway', '~> 3.1.0' # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

捆绑安装工作正常,但当我尝试按照入门并运行此命令

rails g spree:install --user_class=Spree::User

什么都没发生。

请让我知道什么是错的?

这是Gemfile.lock:

 GEM remote: https://rubygems.org/ specs: actionmailer (4.2.7.1) actionpack (= 4.2.7.1) actionview (= 4.2.7.1) activejob (= 4.2.7.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) actionpack (4.2.7.1) actionview (= 4.2.7.1) activesupport (= 4.2.7.1) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionview (4.2.7.1) activesupport (= 4.2.7.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) activejob (4.2.7.1) activesupport (= 4.2.7.1) globalid (>= 0.3.0) activemerchant (1.49.0) activesupport (>= 3.2.14, = 2.1.2, = 0.6.9) nokogiri (~> 1.4) activemodel (4.2.7.1) activesupport (= 4.2.7.1) builder (~> 3.1) activerecord (4.2.7.1) activemodel (= 4.2.7.1) activesupport (= 4.2.7.1) arel (~> 6.0) activesupport (4.2.7.1) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) acts_as_list (0.7.2) activerecord (>= 3.0) addressable (2.4.0) arel (6.0.3) autoprefixer-rails (6.5.1) execjs awesome_nested_set (3.0.3) activerecord (>= 4.0.0, = 5.2.1) sass (>= 3.3.4) builder (3.2.2) byebug (9.0.6) camertron-eprun (1.1.1) cancancan (1.10.1) canonical-rails (0.0.11) rails (>= 3.1, = 3.0.0) cldr-plurals-runtime-rb (1.0.1) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.8) climate_control (>= 0.0.3, = 2.2.0) railties (>= 4.0.0, = 0.5.8) nokogiri (~> 1.6.0) polyglot rails (>= 3.1) devise (3.5.10) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6,  0.1) warden (~> 1.2.3) devise-encryptable (0.1.2) devise (>= 2.1.0) erubis (2.7.0) execjs (2.7.0) ffaker (2.2.0) ffi (1.9.14) font-awesome-rails (4.6.3.1) railties (>= 3.2, = 4.0.0) globalid (0.3.7) activesupport (>= 4.1.0) highline (1.6.21) htmlentities (4.3.4) i18n (0.7.0) jbuilder (2.6.0) activesupport (>= 3.0.0,  1.2) jquery-rails (4.2.1) rails-dom-testing (>= 1, = 4.2.0) thor (>= 0.14, = 3.2.16) json (1.8.3) kaminari (0.17.0) actionpack (>= 3.0.0) activesupport (>= 3.0.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16,  3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.9.1) monetize (1.4.0) money (~> 6.7) money (6.7.1) i18n (>= 0.6.4, = 1.1.1,  2.1.0) orm_adapter (0.5.0) paperclip (4.3.7) activemodel (>= 3.2.0) activesupport (>= 3.2.0) cocaine (~> 0.5.5) mime-types mimemagic (= 0.3.0) paranoia (2.1.5) activerecord (~> 4.0) polyamorous (1.3.1) activerecord (>= 3.0) polyglot (0.3.5) premailer (1.8.7) css_parser (>= 1.4.5) htmlentities (>= 4.0.0) premailer-rails (1.9.4) actionmailer (>= 3,  1.7, >= 1.7.9) puma (3.6.0) rabl (0.12.0) activesupport (>= 2.3.14) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) rails (4.2.7.1) actionmailer (= 4.2.7.1) actionpack (= 4.2.7.1) actionview (= 4.2.7.1) activejob (= 4.2.7.1) activemodel (= 4.2.7.1) activerecord (= 4.2.7.1) activesupport (= 4.2.7.1) bundler (>= 1.3.0, = 4.2.0.alpha) rails-dom-testing (1.0.7) activesupport (>= 4.2.0.beta,  1.6.0) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) railties (4.2.7.1) actionpack (= 4.2.7.1) activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, = 3.0) activerecord (>= 3.0) activesupport (>= 3.0) i18n polyamorous (~> 1.1) rb-fsevent (0.9.7) rb-inotify (0.9.7) ffi (>= 0.5.0) responders (2.3.0) railties (>= 4.2.0, = 4.0.0,  3.1) sprockets (>= 2.8, = 2.0, = 1.1,  0.14) sixarm_ruby_unaccent (1.1.1) spree (3.1.1) spree_api (= 3.1.1) spree_backend (= 3.1.1) spree_cmd (= 3.1.1) spree_core (= 3.1.1) spree_frontend (= 3.1.1) spree_sample (= 3.1.1) spree_api (3.1.1) rabl (~> 0.12.0) spree_core (= 3.1.1) versioncake (~> 2.3.1) spree_auth_devise (3.1.0) devise (~> 3.5.4) devise-encryptable (= 0.1.2) spree_core (~> 3.1.0.beta) spree_backend (3.1.1) bootstrap-sass (~> 3.3) jquery-rails (~> 4.1) jquery-ui-rails (~> 5.0) select2-rails (= 3.5.9.1) spree_api (= 3.1.1) spree_core (= 3.1.1) spree_cmd (3.1.1) thor (~> 0.14) spree_core (3.1.1) activemerchant (~> 1.49.0) acts_as_list (= 0.7.2) awesome_nested_set (~> 3.0.1) cancancan (~> 1.10.1) carmen (~> 1.0.0) deface (~> 1.0.0) ffaker (~> 2.2.0) font-awesome-rails (~> 4.0) friendly_id (~> 5.1.0) highline (~> 1.6.18) kaminari (~> 0.17) monetize (~> 1.1) paperclip (~> 4.3.0) paranoia (~> 2.1.0) premailer-rails rails (~> 4.2.7.1) ransack (~> 1.4.1) responders sprockets-rails state_machines-activerecord (~> 0.2) stringex truncate_html (~> 0.9.3) twitter_cldr (~> 3.0) spree_frontend (3.1.1) bootstrap-sass (>= 3.3.5.1,  0.0.4) jquery-rails (~> 4.1) spree_api (= 3.1.1) spree_core (= 3.1.1) spree_gateway (3.1.0) spree_core (~> 3.1.0.beta) spree_sample (3.1.1) spree_core (= 3.1.1) spring (2.0.0) activesupport (>= 4.2) spring-watcher-listen (2.0.1) listen (>= 2.7, = 1.2,  1.0) rack (> 1, = 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.12) state_machines (0.4.0) state_machines-activemodel (0.4.0) activemodel (>= 4.1, = 0.4.0) state_machines-activerecord (0.4.0) activerecord (>= 4.1, = 0.3.0) stringex (2.6.1) thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5) truncate_html (0.9.3) turbolinks (5.0.1) turbolinks-source (~> 5) turbolinks-source (5.0.0) twitter_cldr (3.5.0) camertron-eprun cldr-plurals-runtime-rb (~> 1.0.0) tzinfo tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (3.0.2) execjs (>= 0.3.0, = 3.2) activesupport (>= 3.2) railties (>= 3.2) tzinfo warden (1.2.6) rack (>= 1.0) web-console (3.3.0) activemodel (>= 4.2) debug_inspector railties (>= 4.2) PLATFORMS ruby DEPENDENCIES byebug coffee-rails (~> 4.2) jbuilder (~> 2.5) jquery-rails listen (~> 3.0.5) puma (~> 3.0) rails (~> 4.2.6) sass-rails (~> 5.0) spree (~> 3.1.0) spree_auth_devise (~> 3.1.0) spree_gateway (~> 3.1.0) spring spring-watcher-listen (~> 2.0.0) sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) web-console BUNDLED WITH 1.13.5 

我遇到过同样的问题! 首先确保在运行上面的命令之前在其中安装了带有secret_key的 Devise initilizer

配置/ initilizers / devise.rb

 Devise.secret_key = "a20fc3f341233168dbc630d965a55792107e1f176784bfb7c6bd4d5762694a533ba273e03365b6614c150f039c42c0e0d" 

我不知道究竟是什么问题。 我在等待时按下了ctrl + c,我注意到了

 gems/spring-2.0.0/lib/spring/client/run.rb:117:in `gets': Interrupt 

是刹车点。 我在这个文件中放了一些调试消息,注意它打开了一个指向的(env.socket_name)套接字

 /run/user/1000/spring-1000/a063a1aa4f0846e81b9eeaf57ad05be4 

我删除了这个文件,这解决了这个问题。 所以看看你的/ run文件夹中有关spring的内容并将其删除,或者我认为系统重启也可以完成这项工作。