无法运行rails服务器

发布于 2024-12-11 01:44:33 字数 2472 浏览 0 评论 0原文

关于为什么我会收到这个有什么建议吗?我的 ruby​​ 版本是 ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0],rails 版本是 Rails 3.1.1。我已经完成了bundle installgem update --system

➜  expertiza git:(master) ✗ rails server   
Usage:
  rails new APP_PATH [options]

Options:
  -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
                                 # Default: jquery
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: /Users/vsingh3/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
  -J, [--skip-javascript]        # Skip JavaScript files
      [--dev]                    # Setup the application with Gemfile pointing to your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing to Rails repository
  -G, [--skip-git]               # Skip Git ignores and keeps
  -m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem path or URL)
  -b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
      [--old-style-hash]         # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
      [--skip-gemfile]           # Don't create a Gemfile
  -d, [--database=DATABASE]      # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                 # Default: sqlite3
  -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:
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -p, [--pretend]  # Run but do not make any changes
  -q, [--quiet]    # Supress status output

Rails options:
  -v, [--version]  # Show Rails version number and quit
  -h, [--help]     # Show this help message and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

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.

谢谢!

Any suggestions on why am I getting this? My ruby version is ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0] and rails version is Rails 3.1.1. I have done bundle install and gem update --system.

➜  expertiza git:(master) ✗ rails server   
Usage:
  rails new APP_PATH [options]

Options:
  -j, [--javascript=JAVASCRIPT]  # Preconfigure for selected JavaScript library
                                 # Default: jquery
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: /Users/vsingh3/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
  -J, [--skip-javascript]        # Skip JavaScript files
      [--dev]                    # Setup the application with Gemfile pointing to your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing to Rails repository
  -G, [--skip-git]               # Skip Git ignores and keeps
  -m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem path or URL)
  -b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
      [--old-style-hash]         # Force using old style hash (:foo => 'bar') on Ruby >= 1.9
      [--skip-gemfile]           # Don't create a Gemfile
  -d, [--database=DATABASE]      # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                 # Default: sqlite3
  -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:
  -f, [--force]    # Overwrite files that already exist
  -s, [--skip]     # Skip files that already exist
  -p, [--pretend]  # Run but do not make any changes
  -q, [--quiet]    # Supress status output

Rails options:
  -v, [--version]  # Show Rails version number and quit
  -h, [--help]     # Show this help message and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

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.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜访吸血鬼 2024-12-18 01:44:33

我不久前遇到了同样的问题,我认为这是由于过时的 gemfile 造成的。确保 gemfile 中列出的 Rails 版本与计算机上安装的 Rails 版本相同。

I encountered this same problem a while back and I think it was due to an outdated gemfile. Make sure you have the same version of rails listed in your gemfile as is installed on your machine.

錯遇了你 2024-12-18 01:44:33

如果您目前没有使用 RVM,您应该考虑一下。它将把不同应用程序的所有环境分开(包括 ruby​​ 版本和 gem 列表/版本)。

You should look in to using RVM if you don't currently. It will keep all of your environments for different applications separate (including ruby versions and gem lists/versions).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文