Rails 5.1.1不生成脚手架/控制器等

时间:2017-05-25 08:48:10

标签: ruby-on-rails ruby-on-rails-5.1

更新了从5.0.1到5.1.1的本地导轨安装。昨晚。我现在没有让任何一代人工作,即rails g scaffold Productrails generate controller Welcome。终端根本没有回应。我必须ctrl-c才能摆脱它。然后我得到以下内容:

^C/Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `gets': Interrupt
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `verify_server_version'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/run.rb:62:in `run'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/run.rb:42:in `warm_run'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/run.rb:35:in `call'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:24:in `call'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    from /Users/Simon/.rvm/gems/ruby-2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    from /Users/Simon/Sites/depot/bin/spring:15:in `require'
    from /Users/Simon/Sites/depot/bin/spring:15:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

我是否应怀疑这里的春天宝石?

我已经开始bundle update

还有:

$ bundle exec spring binstub --all
* bin/rake: spring already present
* bin/rails: spring already present

我的gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.1.1)
      actionpack (= 5.1.1)
      nio4r (~> 2.0)
      websocket-driver (~> 0.6.1)
    actionmailer (5.1.1)
      actionpack (= 5.1.1)
      actionview (= 5.1.1)
      activejob (= 5.1.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.1.1)
      actionview (= 5.1.1)
      activesupport (= 5.1.1)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.1)
      activesupport (= 5.1.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.1.1)
      activesupport (= 5.1.1)
      globalid (>= 0.3.6)
    activemodel (5.1.1)
      activesupport (= 5.1.1)
    activerecord (5.1.1)
      activemodel (= 5.1.1)
      activesupport (= 5.1.1)
      arel (~> 8.0)
    activesupport (5.1.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.5.1)
      public_suffix (~> 2.0, >= 2.0.2)
    arel (8.0.0)
    bindex (0.5.0)
    builder (3.2.3)
    byebug (9.0.6)
    capybara (2.14.0)
      addressable
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    childprocess (0.7.0)
      ffi (~> 1.0, >= 1.0.11)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.0.5)
    erubi (1.6.0)
    execjs (2.7.0)
    ffi (1.9.18)
    globalid (0.4.0)
      activesupport (>= 4.2.0)
    i18n (0.8.1)
    jbuilder (2.6.4)
      activesupport (>= 3.0.0)
      multi_json (>= 1.2)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.5)
      mime-types (>= 1.16, < 4)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.1.0)
    minitest (5.10.2)
    multi_json (1.12.1)
    nio4r (2.0.0)
    nokogiri (1.7.2)
      mini_portile2 (~> 2.1.0)
    public_suffix (2.0.5)
    puma (3.8.2)
    rack (2.0.3)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (5.1.1)
      actioncable (= 5.1.1)
      actionmailer (= 5.1.1)
      actionpack (= 5.1.1)
      actionview (= 5.1.1)
      activejob (= 5.1.1)
      activemodel (= 5.1.1)
      activerecord (= 5.1.1)
      activesupport (= 5.1.1)
      bundler (>= 1.3.0, < 2.0)
      railties (= 5.1.1)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.1.1)
      actionpack (= 5.1.1)
      activesupport (= 5.1.1)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.0.0)
    rb-fsevent (0.9.8)
    rb-inotify (0.9.8)
      ffi (>= 0.5.0)
    ruby_dep (1.5.0)
    rubyzip (1.2.1)
    sass (3.4.24)
    sass-rails (5.0.6)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    selenium-webdriver (3.4.0)
      childprocess (~> 0.5)
      rubyzip (~> 1.0)
      websocket (~> 1.0)
    spring (2.0.2)
      activesupport (>= 4.2)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.0)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.3.13)
    thor (0.19.4)
    thread_safe (0.3.6)
    tilt (2.0.7)
    turbolinks (5.0.1)
      turbolinks-source (~> 5)
    turbolinks-source (5.0.3)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    uglifier (3.2.0)
      execjs (>= 0.3.0, < 3)
    web-console (3.5.1)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket (1.2.4)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  byebug
  capybara (~> 2.13)
  coffee-rails (~> 4.2)
  jbuilder (~> 2.5)
  listen (>= 3.0.5, < 3.2)
  puma (~> 3.7)
  rails (~> 5.1.1)
  sass-rails (~> 5.0)
  selenium-webdriver
  spring
  spring-watcher-listen (~> 2.0.0)
  sqlite3
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)

BUNDLED WITH
   1.14.6

2 个答案:

答案 0 :(得分:3)

尝试从可用的rake任务更新bin。

rake app:update:bin

或者......如果是在更高版本的rails ...

rake rails:update:bin 

答案 1 :(得分:0)

也许您需要重新安装节点并再次进行纱线操作。

对于Mac

$ brew安装节点

$ brew安装纱

$ rails new myproject --skip-turbolinks --webpack = vue --database = postgresql