2016-11-24 10 views
1

私はRuby環境が初めてです。私はルビーを設定しました。私がサーバを起動すると、一連のエラーが発生しました。誰かが私に手を差し伸べてください。私はサーバを起動する際に問題があります

2.3.1 :001 > rails s 

NameError: undefined local variable or method `s' for main:Object 
    from (irb):1 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/console.rb:110:in `start' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/console.rb:9:in `start' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:68:in `console' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 
    from /Users/User/workspace/dineconnect-backend/bin/rails:9:in `<top (required)>' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/commands/rails.rb:6:in `call' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/command_wrapper.rb:38:in `call' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:191:in `block in serve' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:161:in `fork' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:161:in `serve' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `run' 
    from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>' 
    from /Users/User/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from /Users/User/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from -e:1:in `<main>' 

答えて

0

あなたはrails consoleを使用しています。コンソールから出て、終了をタイプしてからrails s

2

あなたは対話型Rubyシェル(IRBまたはirb)でレールサーバーを起動しようとしているか、またはレールコンソールである可能性があります。

あなたはレールの基礎のために、このhttp://guides.rubyonrails.org/getting_started.htmlを検討する必要がありますあなたの端末に

をコマンド

レールの

を使用しています。

関連する問題