Rails 服务器不通过命令“Rails s"启动 [英] Rails server does not start by command "Rails s"

查看:33
本文介绍了Rails 服务器不通过命令“Rails s"启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 ruby​​ 和 rails 的新手,我在 ubuntu 中安装了 rails.但是当我通过键入rails s"进入启动服务器时,它不会启动并出现以下消息.但我可以通过 command rails new new_project 创建一个新项目.请 Rails 专家帮助我.

I'm new to ruby and rails and i installed rails in to the ubuntu. but when i go to the start server by typing "rails s" it doesn't start and comes following message . but i can create a new project by command rails new new_project. please rails specialists help-out me.

root@ubuntu:~# rails s Usage: rails new APP_PATH [options] Options: -j, [--javascript=JAVASCRIPT] 
# Preconfigure for selected JavaScript library # Default: jquery -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) [--dev] 
# Setup the application with Gemfile pointing to your Rails checkout -J, [--skip-javascript] # Skip JavaScript files [--edge] 
# Setup the application with Gemfile pointing to Rails repository -G, [--skip-git] 
# Skip Git ignores and keeps -d, [--database=DATABASE] 
# Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 
# Default: sqlite3 -b, [--builder=BUILDER] 
# Path to a application builder (can be a filesystem path or URL) -r, [--ruby=PATH] 
# Path to the Ruby binary of your choice 
# Default: /usr/bin/ruby1.8 [--old-style-hash] 
# Force using old style hash (:foo => 'bar') on Ruby >= 1.9 [--skip-gemfile] 
# Don't create a Gemfile -O, [--skip-active-record] 
# Skip Active Record files [--skip-bundle] # Don't run bundle install -T, [--skip-test-unit] 
# Skip Test::Unit files -S, [--skip-sprockets] 
# Skip Sprockets files Runtime options: -q, [--quiet] 
# Supress status output -f, [--force] 
# Overwrite files that already exist -s, [--skip] 
# Skip files that already exist -p, [--pretend] 
# Run but do not make any changes Rails options: -h, [--help] 
# Show this help message and quit -v, [--version] 
# Show Rails version number and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. You can specify extra command-line arguments to be used every time 'rails new' runs in the .railsrc configuration file in your home directory. Note that the arguments specified in the .railsrc file don't affect the defaults values shown above in this help message. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going

推荐答案

  1. 您需要创建一个新的 Rails 应用(除非您已经有了)

  1. You need to create a new Rails app (unless you already have one)

rails new my_app

  • 转到您的应用目录

  • Go to your app directory

    cd my_app
    

  • 在那个目录下启动服务器

  • Start the server in that directory

    rails s
    

  • 这篇关于Rails 服务器不通过命令“Rails s"启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆